Xref: utzoo comp.unix.wizards:17450 comp.unix.questions:15329 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!kender From: kender@eleazar.dartmouth.edu (Too hot to handle) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Checking an fd for pending data (sans select(3)) Summary: I wanna check an fd for pending data Message-ID: <14779@dartvax.Dartmouth.EDU> Date: 2 Aug 89 01:22:52 GMT References: <11727@cgl.ucsf.EDU> <4001@cps3xx.UUCP> Sender: news@dartvax.Dartmouth.EDU Reply-To: kender@eleazar.dartmouth.edu Followup-To: comp.unix.wizards Organization: Dartmouth College, Hanover, NH Lines: 15 I'd like a function (in C for all you fortran holdouts) that would tell me if there is data on the stream to read, this would be ideal: if (pending(fd) == 1) { /* there is data to read ... read data ... } else { /* no data...we can go on */ ... } this is for SYS V and I'm sans a select...so keep that in mind. thanx in advance. -k ******************************************************************************** Cathy Huse: HB 1326, Dartmouth College, Hanover, New Hampshire; 03755 InterNet: kender@eleazar.dartmouth.edu "What does an actor want with a conscience anyway?" --Jiminy Cricket