Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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
Node Status?
node history
Node Type: note [id://192450]
help
Chatterbox?
[marto]: running late today, get to work and people are just sitting around. "can't delete file, quota exceeded"
[Corion]: marto: Oy :-/
[Corion]: Ah, it's only "quota exceeded", not "filesystem full", so it's "merely" an administrative act to up the FS quota resp. inode quota
[Corion]: I've been on databases where I couldn't drop a table or delete rows because the DB was full. Not so much fun...
[marto]: meh, the admins are lazy, I just piped null to some old large log files, problem solved

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2017-01-24 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.