Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by RMGir (Prior)
on Aug 23, 2002 at 21:11 UTC ( #192450=note: print w/ replies, xml ) Need Help??


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.
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://192450]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-09-21 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls