Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 1997 00:40:02 -0800 (PST)
From:      John-Mark Gurney <jmg@nike.efn.org>
To:        freebsd-bugs
Subject:   bin/777 patch had problems with closed tty...
Message-ID:  <199702110840.AAA08323@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/777; it has been noted by GNATS.

From: John-Mark Gurney <jmg@nike.efn.org>
To: asami@cs.berkeley.edu, freebsd-gnats-submit@freefall.FreeBSD.org,
        FreeBSD Current <freebsd-current@freebsd.org>
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)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702110840.AAA08323>