Is there anything that describes "timer
sockets" (PF_TIMER). I've
never seen these before and was wondering what problem they solved.
Briefly, they
provide a file-descriptor interface to the timer
facilities underlying setitimer(ITIMER_REAL) and SIGALRM.
Does this allow one to
interrupt a pending select with a little more
grace?
Depends on what you mean. If you mean "in response to an asynchronous
external condition", no, they don't. If you mean "in response to one
of various timeouts expiring", yes, they do, if you throw the timer
socket file descriptor(s) into the select set.
humm. I guess they would also allow you to have
multiple timers, and
you can tell which one fired by the fd...
Yes. That's another reason I find them useful - you don't have to keep
your own list of timers and constantly pick out the next one to expire,
simplifying code.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B