http://qs321.pair.com?node_id=192450


in reply to Re: They didn't give me a fork so I have to eat with a spawn.
in thread They didn't give me a fork so I have to eat with a spawn.

Win32's Perl 5.6.1 does have an emulated fork(), though. Is there something wrong with that?

Yup.

If you try to fork and "spawn" off a bunch of system() calls, you get "Resource temporarily unavailable" after some fairly small number of forks (maybe 20?).

With Win32::Process::CreateProcess, you don't run into that problem.
--
Mike

  • Comment on Re: Re: They didn't give me a fork so I have to eat with a spawn.

Replies are listed 'Best First'.
Re: Re: Re: They didn't give me a fork so I have to eat with a spawn.
by bart (Canon) on Aug 24, 2002 at 09:00 UTC
    Good call.

    BTW you should look into using $^X instead of the hardcoded path to perl.

Re: Re: Re: They didn't give me a fork so I have to eat with a spawn.
by Anonymous Monk on Oct 08, 2002 at 02:00 UTC
    will the parent process have to wait until the child complete?
      If you use ActivePerl's fork, I believe so, since no new process is actually created.

      If you use CreateProcess, I don't think so.
      --
      Mike