Your premise that the child process doesn't call exit is wrong. Either it exited properly by calling exit with an exit code (setting $?'s high byte) or it was terminated by a signal (setting $?'s low byte). There's no other way for it to exit.
I thought exec executes a system command and never returns..
Same goes for the call to exit it's replacing.
Also, why is 'exec' preferred over 'system + _exit' ?
You're creating a process whose sole purpose is to do nothing but create a process, and you're doing that for as many hosts as you have in your array. It's wasteful! It also requires more code and introduces problems (refer to the bug I mentioned it fixed).
In reply to Re^5: Parallel::ForkManager run_on_finish exit code handler
by ikegami
in thread Parallel::ForkManager run_on_finish exit code handler
by sojourn548
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |