From owner-freebsd-current Wed Mar 26 00:08:44 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA24675 for current-outgoing; Wed, 26 Mar 1997 00:08:44 -0800 (PST) Received: from hydrogen.nike.efn.org (metriclient-9.uoregon.edu [128.223.172.9]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA24669 for ; Wed, 26 Mar 1997 00:08:39 -0800 (PST) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.4/8.8.4) id AAA14595; Wed, 26 Mar 1997 00:07:30 -0800 (PST) Message-ID: <19970326000730.08071@hydrogen.nike.efn.org> Date: Wed, 26 Mar 1997 00:07:30 -0800 From: John-Mark Gurney To: freebsd-current@freebsd.org Subject: patch to make chat work on non-tty devices... Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.67 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2-960801-SNAP i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk anybody object to me committing this patch to chat? all it does is not error out when the input isn't a tty... it seems the struct was already there to support non-tty devices... just wasn't properly added... comments? anybody think I should remove the warning, and just let it slide? Index: chat.c =================================================================== RCS file: /home/ncvs/src/usr.bin/chat/chat.c,v retrieving revision 1.6 diff -c -r1.6 chat.c *** chat.c 1997/02/22 19:54:23 1.6 --- chat.c 1997/03/26 08:01:33 *************** *** 542,548 **** if (get_term_param (&t) < 0) { ! sysfatal("Can't get terminal parameters"); } saved_tty_parameters = t; --- 542,550 ---- if (get_term_param (&t) < 0) { ! syslog(LOG_WARNING, "warning: Can't get terminal parameters"); ! have_tty_parameters = 0; ! return; } saved_tty_parameters = t; -- John-Mark Modem/FAX: (541) 683-6954 (FreeBSD Box) Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)