Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!math-cs.kent.edu!usenet.ins.cwru.edu!cwns1!chet From: chet@cwns1.CWRU.EDU (Chet Ramey) Newsgroups: comp.sys.encore Subject: Re: Problems with flush ? Message-ID: <1990Jun5.005224.14406@usenet.ins.cwru.edu> Date: 5 Jun 90 00:52:24 GMT References: <9006011518.AA06239@jones.cis.ohio-state.edu> Sender: news@usenet.ins.cwru.edu Reply-To: chet@po.CWRU.Edu Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 33 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 #include 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