Problem with Parallel::ForkManager on Windows Vista

I'm using Parallel::ForkManager to periodically run a number of tasks
in parallel. It seems to work about 90% of the time. What I'm finding
the remaining 10% of the time, however, is that the while the forked
off process disappears from the windows process list, it never seems
to register as completed with the waitpid ()within Perl nor does it
decrement the parent process's thread count in the process list.

I'm aware that fork isn't fully supported really on Windows but maybe
someone's familiar with this issue or is aware of a workaround.


Thanks in advance,
Jacob.
Jacob JKW [ Do, 24 Januar 2008 10:23 ] [ ID #1915677 ]

Re: Problem with Parallel::ForkManager on Windows Vista

On Jan 24, 4:23 am, Jacob JKW <jacob... [at] yahoo.com> wrote:
> I'm using Parallel::ForkManager to periodically run a number of tasks
> in parallel. It seems to work about 90% of the time. What I'm finding
> the remaining 10% of the time, however, is that the while the forked
> off process disappears from the windows process list, it never seems
> to register as completed with the waitpid ()within Perl nor does it
> decrement the parent process's thread count in the process list.
I described this poorly.

I should have mentioned that each forked child runs a system command
from which the standard out is being captured. These are the PIDs I'm
seeing on the process list and that are then (correctly)
disappearing. It's the child processes that call them that aren't
terminating (about 10% of the time).

It would appear that if the children don't capture any stdout the
problem I goes away -- the system commands terminate as do the child
processes that called them.

Whatever caused this problem it seems to have something to do with
multiple children all reading from the STDOUT of opened pipes. I can
only assume that this is a known issue with the Windows implementation
of fork.
Jacob JKW [ Do, 24 Januar 2008 13:20 ] [ ID #1915683 ]
Perl » comp.lang.perl.misc » Problem with Parallel::ForkManager on Windows Vista

Vorheriges Thema: FAQ 8.45 How do I install a module from CPAN?
Nächstes Thema: FAQ 9.9 How do I automate an HTML form submission?