Re: Fork (not the kind you eat with)

2001-06-29 Thread Chas Owens
On 29 Jun 2001 09:52:16 +0100, Pierre Smolarek wrote: > Small problem with the below code how can you control the MAX amount of > children you have? > Well, that is harder. One way (and there are probably better ones) would be to work with many subsets of the machines getting the pids for

Re: Fork (not the kind you eat with)

2001-06-29 Thread Pierre Smolarek
Small problem with the below code how can you control the MAX amount of children you have? - Original Message - From: "Chas Owens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 28, 2001 7:07 PM Subject: Re: Fork (not the kind you eat with)

Re: Fork (not the kind you eat with)

2001-06-28 Thread Pierre Smolarek
Thanks a lot and thanks to the guy who mentioned those book, amazon has my order :) this code was exactly what i needed... - Original Message - From: "Chas Owens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 28, 2001 7:07 PM Subject: Re:

Re: Fork (not the kind you eat with)

2001-06-28 Thread Peter Scott
At 05:03 PM 6/28/01 +0100, Pierre Smolarek wrote: >The one thing in perl that gets my head all confused is fork. > >Can someone point me in the right direction (be it book, website, or kind >enough to offer code). "Network Programming with Perl", by Lincoln Stein (Addison-Wesley, 2001) is very g

Re: Fork (not the kind you eat with)

2001-06-28 Thread Chas Owens
A parent can fork as many times as it wants to (for that matter a child could fork as well). So your code would look like this: $SIG{CHLD} = "IGNORE"; #works on unix platforms, auto reaps children foreach $machine (get_machines()) { $pid = fork; if ($pid == 0) { #I am a child

Fork (not the kind you eat with)

2001-06-28 Thread Pierre Smolarek
The one thing in perl that gets my head all confused is fork. Can someone point me in the right direction (be it book, website, or kind enough to offer code). I need to make a script that has to check 16000 servers in around 6 minutes. My rough maths works out that 44 checks a second are needed.