in reply to fork processes
Ok, after your clarifications, it doesn't seem to be a fencepost error.
And since I've not really used the fork()s yet *grin*, I was a bit slow in spotting what I think is your reason; in the if ($child_id == 0) block, there's no exit(); so you fall through the end of the block and, the way I see it, execute the loop once more from within the child.
Oh and, why're you using backticks in void context? I think system() would be a better choice there. :-)
|
|---|