repeatability of select()

Jonathan Hue hue at netcom.UUCP
Wed Mar 14 18:27:37 AEST 1990



Under what conditions would the following code fragments not be
equivalent?

case #1:
	n = select(nfds, rdset, wrset, exset, timeout_p);

case #2:
	select(nfds, rdset, wrset, exset, timeout_p);
	/* reset rdset, wrset, and exset to their original values */
	...
	n = select(nfds, rdset, wrset, exset, (struct timeval *) 0);


I'm interested in the behavior on any version of UNIX.  Assume for the moment
that select() isn't getting interrupted by a signal or anything like that.

One case I can think of is HP-UX and a graphics display.  You can detect
vertical retrace interrupts or blitter interrupts by setting the bit
corresponding to an open frame buffer in the exception mask.  If you called it
again without reenabling the interrupt you wouldn't see the second one.  Are
there any other cases like this?


-Jonathan



More information about the Comp.unix.wizards mailing list