Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!zeus!s64421 From: s64421@zeus.usq.EDU.AU (house ron) Newsgroups: comp.lang.c Subject: Re: flushing input buffer Message-ID: Date: 1 May 91 13:43:49 GMT References: <1991Apr26.152944.1928@fys.ruu.nl> Lines: 26 enag@ifi.uio.no (Erik Naggum) writes: >Under UNIX systems, you can issue an I/O control request to flush >input and output buffers in the operating system. These are very much >different from I/O buffers in the program. >The appropriate I/O control for the UNIX system I'm sitting at right >now is > ioctl (fd, TCFLSH, TCIFLUSH); >Don't think that this is what's good for your system. Look up the >manual page for ioctl(2), follow the reference to what looks like the >terminal device (termio(4)), and look for the word "flush". If you're >unfamiliar with ioctl's, read the entire ioctl man-page, and then read >all of the termio man-page, even if you don't (think you) need it >right now. I had occasion to do this under Unix. As far as I could tell, these ioctl calls are not reliable. I don't have the details handy, though. -- Regards, Ron House. (s64421@zeus.usq.edu.au) (By post: Info Tech, U.C.S.Q. Toowoomba. Australia. 4350)