Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!brunix!cgy From: cgy@cs.brown.edu (Curtis Yarvin) Newsgroups: comp.unix.wizards Subject: Re: FIONREAD Message-ID: <69906@brunix.UUCP> Date: 26 Mar 91 22:02:23 GMT References: <69819@brunix.UUCP> <11473@dog.ee.lbl.gov> Sender: news@brunix.UUCP Reply-To: cgy@cs.brown.edu (Curtis Yarvin) Organization: Brown University Department of Computer Science Lines: 15 In article <11473@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes: >In article <69819@brunix.UUCP> cgy@cs.brown.edu (Curtis Yarvin) writes: >>What is the most elegant way of duplicating Sun's FIONREAD ioctl, which >>gets the number of bytes readable from a descriptor, on 4.3BSD systems? > >The `most elegant' is to avoid it altogether---FIONREAD tends to induce races This is no doubt why Ultrix, at least, buried it deep within the bowels of the tty(4) page. Thanks to everyone who replied. curtis "I tried living in the real world Instead of a shell But I was bored before I even began." - The Smiths