Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ncr-sd!laman
From: laman@ncr-sd.UUCP
Newsgroups: comp.bugs.4bsd
Subject: Re: read() from tty has fencepost error
Message-ID: <1611@ncr-sd.SanDiego.NCR.COM>
Date: Thu, 9-Jul-87 15:33:59 EDT
Article-I.D.: ncr-sd.1611
Posted: Thu Jul  9 15:33:59 1987
Date-Received: Sat, 11-Jul-87 17:48:44 EDT
References: <648@haddock.UUCP> <6040@brl-smoke.ARPA> <13048@topaz.rutgers.edu> <1325@crash.CTS.COM> <13145@topaz.rutgers.edu>
Reply-To: laman@ncr-sd.UUCP (Mike Laman)
Organization: NCR Corporation, Rancho Bernardo
Lines: 36

In article <13145@topaz.rutgers.edu> ron@topaz.rutgers.edu (Ron Natalie) writes:
	:
	:
	:
 >
 >To make BSD work like Sys V you can kludge it by changing tty.c routine
 >ttread (around line 2191 in mine) where it says
 >
 >	if(u.u_resid == 0)
 >		break;
 >
 >to say something like
 >
 >    if(u.u_resid == 0)  {
 >        if(				    /* IF there
 >	    p->c_cc > 0  &&		    /* are more characters AND    */
 >	    (*p->c_cf & 0x377) == eof &&    /* ..the next is EOF AND      */
			 ^
	Get rid of the 'x' so you get an octal contant
 >	    (t_flags & CBREAK) == 0   &&    /* ..we're in cooked mode AND */
 >	    (ttbreakc(c, tp) == 0)	    /* .. last char wasn't break  */
 >        ) getc(tp);	    /* Throw away EOF that goes with this data. */
 >        break;
 >    }
 >
 >I don't feel like remaking the kernel now, so I can't tell you if
 >it works.
 >
 >-Ron

Just thought I'd point this out in case some did want to try this.

Not having access to a BSD kernel, I can't comment on the rest of the code.

		Mike Laman
		UUCP: {ihnp4,sdcsvax,noscvax,...}!ncr-sd!laman