From owner-freebsd-bugs Tue Feb 11 00:40:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA08343 for bugs-outgoing; Tue, 11 Feb 1997 00:40:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA08323; Tue, 11 Feb 1997 00:40:02 -0800 (PST) Date: Tue, 11 Feb 1997 00:40:02 -0800 (PST) Message-Id: <199702110840.AAA08323@freefall.freebsd.org> To: freebsd-bugs Cc: From: John-Mark Gurney Subject: bin/777 patch had problems with closed tty... Reply-To: John-Mark Gurney Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/777; it has been noted by GNATS. From: John-Mark Gurney To: asami@cs.berkeley.edu, freebsd-gnats-submit@freefall.FreeBSD.org, FreeBSD Current Cc: Subject: bin/777 patch had problems with closed tty... Date: Tue, 11 Feb 1997 00:30:02 -0800 (PST) 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)