Checking an fd for pending data (sans select(3))

Too hot to handle kender at eleazar.dartmouth.edu
Wed Aug 2 11:22:52 AEST 1989


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 at eleazar.dartmouth.edu
      "What does an actor want with a conscience anyway?" --Jiminy Cricket



More information about the Comp.unix.wizards mailing list