Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

(MeowChow) Re: 65 is the magic number!

by MeowChow (Vicar)
on May 14, 2002 at 10:08 UTC ( #166409=note: print w/ replies, xml ) Need Help??


in reply to 65 is the magic number!

Ok, I totally blew it on this one. The problem is that you are launching too many children without reaping any of them; a scenario which reduces to this:

perl -le "print $p, ':', ++$i while $p = fork"
The solution under unix would be to hook $SIG{CHLD} and reap them properly, a la perlipc. Unfortunately signals don't work properly under windows, so I'm not sure how you should handle this. Perhaps hack something up which involves waitpid -1, &WNOHANG; when the number of simultaneous children get high. You may also want to consider running under Cygwin.
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print


Comment on (MeowChow) Re: 65 is the magic number!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2015-07-31 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls