in reply to Fork() confusion

I haven't felt the need for using a module for handling fork, but glancing at Parallel::ForkManager I see that the methods are called things like run_on_finish, but you are omitting the "run_" part of the name in your code sample. Could that be your problem?

If you want an explanation of forking, you could do worse than this article. Don't let the cartoons put you off, there is quite a bit of technical content there.

Replies are listed 'Best First'.
Re: Re (tilly) 1: Fork() confusion
by dkode (Acolyte) on May 29, 2001 at 08:18 UTC
    Tilly, I originally had the run_on_start and run_on_finish but for some reason it wouldn't run so i searched through the ForkManager.pm and found that the methods are called on_start and on_finish, quite strange. I should mention that I am using ActivePerl for windows. I think that might be the problem. Thanks for the quick response. DKode
      Ah. Well Perl 5.6 on Windows offers an emulation of fork, but does not actually provide forking. Personally I would not trust it. However I have successfully used Run commands in parallel under Windows NT. But YMMV.

      Personally I think that if you want to play with process control, you are best off either using a Windows model or else getting yourself a Unix or Unix-like system. (These days it isn't that hard to install Linux or FreeBSD...)