On Mon, 19 Feb 2007, Amos Shapira wrote:

Or the timer expires and makes the waiter do some "test and repeat" job,
which falls under my definition of "busy wait" (even if it gets to rest for
a while between iterations).

The wait consists in yielding. The process spends user time only while not in select() for timeout values which are not smaller than the fundamental timeslice.

Huh?? When a group leader exits his parent gets SIGCHLD. That's one of those
sticky PITA's of UNIX process programming. (I've just double-checked this
with a quick program which demonstrate it). The only way I can remember to
avoid receving SIGCHLD is by setting it's handler to SIG_IGN (ignore).

A correctly written pgld has no parent. When it dies its exit signal goes to init.

You are getting off subject - the original question was about how to find
out that the other side of a socketpair has closed it.

There is none. That's the point. You can monitor the pid to see if it went away. Worse if the process becomes a zombie then even that will not work. You cannot make assumptions about a resource someone else owns. That's why properly written daemons are important. They cannot become zombies (because init always exists).

Peter

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to