derby has asked for the wisdom of the Perl Monks concerning the following question:

I'm starting to look at Parallel::ForkManager for a particular project but I'm having some issues with the following caveat found in the docs:

Do not use Parallel::ForkManager with fork and wait.

Now I can see not using fork/wait in the parent process but for this particular project I need to fork/exec/wait in the child processes (via system - don't ask).

So my question is does the fork/wait caveat apply wholesale or is just for the parent process?

-derby

Replies are listed 'Best First'.
Re: Parallel::ForkManager fork/wait caveat
by Aristotle (Chancellor) on Oct 30, 2002 at 15:08 UTC
    Well, it applies wholesale insofar as the fork/wait calls will be off bounds of any limit imposed using Parellel::ForkManager. There is no intrinsic problem in using them, of course.

    Makeshifts last the longest.

      You can use fork/wait system calls in a process if you don't use the $pm->start or $pm->wait* methods in it, so you can freely use them in child processes.
        Thanks dLuxx (and Aristotle). dLuxx since your monk name is very close to Parallel::ForkManager's authors name can I assume you're one in the same? If so, thanks for the module - it's going to be a great help.

        -derby