Thanks a lot for your replies, I've incorporated the children counter
variable, increasing it after every fork, decreasing it after every
SIG{CHLD}.

However, I still have an unresolved issue,

Jay:

> It's not missing; it was never there. Your parent process dies before
> its children are finished. It is no longer around to reap the status of
> their execution. You would have to add a wait loop at the end of your
> program.
>

Jeff:

> You can't see the output in your log is because when your childs are
> executing,your parent has exited.


How come I'm not returned to the console if my parent process is dead? The
script just hangs there.

And again in the perlfork manpage under the heading exit():

> exit() always exits just the executing pseudo-process, after automatically
> wait()-ing for any outstanding child pseudo-processes. Note that this means
> that the process as a whole will not exit unless all running
> pseudo-processes have exited.


Does that not mean that a parent will stay alive until all children have
finished ?

Thanks again for the help.

Regards

Cornelis


--memento mori

Reply via email to