Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rti-sel.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!rti-sel!trt From: trt@rti-sel.UUCP (Tom Truscott) Newsgroups: net.unix-wizards Subject: Re: Undocumented 4.2 tty driver features Message-ID: <371@rti-sel.UUCP> Date: Fri, 23-Aug-85 11:19:49 EDT Article-I.D.: rti-sel.371 Posted: Fri Aug 23 11:19:49 1985 Date-Received: Sun, 25-Aug-85 13:39:52 EDT References: <428@azure.UUCP> Distribution: net Organization: Research Triangle Institute, NC Lines: 16 As you point out, the FREAD/FWRITE parameter to the TIOCFLUSH ioctl is not merely undocumented, it is required! That is: ioctl(fd, TIOCFLUSH, (char *)0); is a NOP on 4.2 BSD/VAX. I suppose this feature is widely known, but I have noticed some programs that have these NOPs in them. For example, the 'flushinp()' routine in Pavel Curtis' terminfo. The correct way to flush input is, of course: #includeint flushread = FREAD; ... ioctl(fd, TIOCFLUSH, (char *)&flushread); It would be nice if a third parameter of '(char *)0' had the effect of flushing both input and output. Perhaps in 4.3 BSD? Tom Truscott