From owner-freebsd-current Tue Feb 11 00:30:23 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA07775 for current-outgoing; Tue, 11 Feb 1997 00:30:23 -0800 (PST) Received: from hydrogen.nike.efn.org (metriclient-6.uoregon.edu [128.223.172.6]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA07770 for ; Tue, 11 Feb 1997 00:30:18 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hydrogen.nike.efn.org (8.8.4/8.8.4) with SMTP id AAA29319; Tue, 11 Feb 1997 00:30:02 -0800 (PST) Date: Tue, 11 Feb 1997 00:30:02 -0800 (PST) From: John-Mark Gurney Reply-To: John-Mark Gurney To: asami@cs.berkeley.edu, freebsd-gnats-submit@freefall.FreeBSD.org, FreeBSD Current Subject: bin/777 patch had problems with closed tty... Message-ID: X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk well... I finally found the problem with this bug... it seems that the ask routine will default to a cr if there is an error on the read (i.e. eof)... so it defaults to "not skip this patch"... because you didn't skip the stdin it tries it again and again... so the only way to EASILY resolve this bug it to make the default for the question to be yes, skip this patch.... here is the patch: Index: pch.c =================================================================== RCS file: /usr/cvs/src/gnu/usr.bin/patch/pch.c,v retrieving revision 1.8 diff -c -r1.8 pch.c *** pch.c 1996/04/12 11:37:32 1.8 --- pch.c 1997/02/11 08:24:31 *************** *** 231,238 **** filearg[0] = fetchname(buf, 0, FALSE); } if (filearg[0] == Nullch) { ! ask1("No file found--skip this patch? [n] "); ! if (*buf != 'y') { continue; } if (verbose) --- 231,238 ---- filearg[0] = fetchname(buf, 0, FALSE); } if (filearg[0] == Nullch) { ! ask1("No file found--skip this patch? [y] "); ! if (*buf == 'n') { continue; } if (verbose) comments? is it ok if we change the default?? John-Mark gurney_j@efn.org http://resnet.uoregon.edu/~gurney_j/ Modem/FAX: (541) 683-6954 (FreeBSD Box) Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)