george@CIS.OHIO-STATE.EDU (George M. Jones) (06/01/90)
Anybody got a clue as to why the input buffers were not flushed ? Is
there a known problem with TIOCFLUSH ?
strings /Umax.image | grep Umax
Umax 4.3 (R4_0.0) APC NFS Mon Mar 19 15:07:10 1990
11:10am> cat flush.c
#include <sys/ioctl.h>
main ()
{
ioctl( 0, TIOCFLUSH, 0 );
}
11:10am> cc -o flush flush.c
11:15am> sleep 5;./flush
asdf
asdf
11:15am> asdf
asdf: Command not found.
11:15am> asdf
asdf: Command not found.
11:15am>
rickert@CS.NIU.EDU (Neil Rickert) (06/01/90)
george@CIS.OHIO-STATE.EDU writes: >Anybody got a clue as to why the input buffers were not flushed ? Is >there a known problem with TIOCFLUSH ? You omitted the important information. Were you logged in at the terminal, at a slave port on an annex, or with the 'telnet', 'rlogin' or 'call' protocol? If you are using the 'call' protocol there is always the chance that TIOCFLUSH correctly cleared the input buffer (which was already empty) but did not clear the annex buffer which had not yet been transferred to the host.
george@jones.cis.ohio-state.edu (George M. Jones) (06/01/90)
In article <9006011541.AA26530@cs.niu.edu> rickert@CS.NIU.EDU (Neil Rickert) writes: george@CIS.OHIO-STATE.EDU writes: >Anybody got a clue as to why the input buffers were not flushed ? Is >there a known problem with TIOCFLUSH ? You omitted the important information. Were you logged in at the terminal, at a slave port on an annex, or with the 'telnet', 'rlogin' or 'call' protocol? Before posting I tested it both on the console and using telnet from another machine. I just tested rlogin, telnet and call from the annex. There is no difference. It appears that the input buffer is never being flushed. ---George -=- OSU Computer & Inf. Science 2036 Neil Ave.,Columbus,Ohio 43210. 614-292-7325 george@cis.ohio-state.edu or ...!osu-cis!george X windows. Flaky and built to stay that way.
chet@cwns1.CWRU.EDU (Chet Ramey) (06/05/90)
In article <9006011518.AA06239@jones.cis.ohio-state.edu> george@cis.ohio-state.edu writes: > >Anybody got a clue as to why the input buffers were not flushed ? Is >there a known problem with TIOCFLUSH ? No, you used it wrong. The third argument is a pointer to an int, and is dereferenced before being checked. That might be your problem. > strings /Umax.image | grep Umax > Umax 4.3 (R4_0.0) APC NFS Mon Mar 19 15:07:10 1990 This code works on an IBM RT running 4.3 BSD; I think it will work for you. #include <sys/ioctl.h> #include <sys/file.h> main(argc, argv) int argc; char **argv; { int fr = FREAD; if (ioctl(0, TIOCFLUSH, &fr) != 0) perror("ioctl: TIOCFLUSH"); } Chet -- Chet Ramey "...but worst of all, young man, Network Services Group you've got Industrial Disease!" Case Western Reserve University chet@ins.CWRU.Edu