in reply to How to tell a child what to do?
Note that if you use pipe-open, open returns the PID of the child. To determine a child terminating, set up a signal handler to catch SIGCLD. This signal doesn't tell you the pid, but if you do a wait or a waitpid in the handler, you do. Given the PID of the terminated child, you know which task was assigned to it (assuming you stored this information when dealing out the tasks).
Study man perlipc, it's a real treasure trove. It should have enough examples to get you on your way.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to tell a child what to do?
by Eyck (Priest) on Sep 21, 2005 at 10:12 UTC | |
by Eyck (Priest) on Sep 21, 2005 at 10:36 UTC | |
by Anonymous Monk on Sep 21, 2005 at 11:09 UTC | |
by Eyck (Priest) on Sep 21, 2005 at 11:26 UTC | |
by Anonymous Monk on Sep 21, 2005 at 12:25 UTC | |
|