in reply to Monitoring child threads
I'd suggest making a signal handler for SIGCHLD, then your handler could examine the data structures owned by the child and look for an error state. So your child can set its state to "IDLE" until it gets a job, then set its state to "WORKING", and then "IDLE" when the job ends. Finally, set the state to "DONE" before terminating normally. If you get a SIGCHLD and the child isn't in "DONE" state, it's an error.
I'd suggest ignoring this node, as it's completely wrong, as indicated by TOD below...
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Monitoring child threads
by weismat (Friar) on Jan 24, 2008 at 13:26 UTC | |
by roboticus (Chancellor) on Jan 24, 2008 at 13:37 UTC |