Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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.

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2023-12-03 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (20 votes). Check out past polls.

    Notices?