Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: FIONREAD Message-ID: <11473@dog.ee.lbl.gov> Date: 26 Mar 91 19:48:15 GMT References: <69819@brunix.UUCP> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 11 X-Local-Date: Tue, 26 Mar 91 11:48:15 PST 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---but by far the simplest method of duplicating Sun's FIONREAD ioctl is to note that Sun *got* it from 4BSD. All you have to do is use it. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov