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

Hello, I seem to be running into problems with Windows using Perl Parallel::Forkmanager. The package seems to run fine when I am testing it, but while running it fails sometimes, one of the forked process keeps running and doesn't return to parent.
A new issue found today was that Windows is not able to auto-kill the process from the task-scheduler after a timeout of 3 hours.


pm = new Parallel::ForkManager(threads);
for (i = 0 ; i < threads; i++) {
sleep(i);
pm->start and next;
..... DO Something, involves DB function, lots of files handles, and also
..... using some lock files with flock.
pm->finish;
}
pm->wait_all_children;


Any help will be greatly appreciated.

Replies are listed 'Best First'.
Re: Parallel ForkManager Windows issue
by BrowserUk (Patriarch) on Mar 13, 2013 at 18:42 UTC

    Sounds like you have found a bug.

    For anyone to stand a chance of debugging this, you'll need to post working code that demonstrates the problem.

    If you cannot post the actual code, then you'll need to work on a cut-down version that fails in the same way.

    You'll also need to supply the relevant version numbers for the module; Perl; and anything else use to reproduce it.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.