CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
fork( ) in Perl Help !!

 



mackiew
Deleted

Oct 12, 2000, 4:14 AM

Post #1 of 2 (931 views)
fork( ) in Perl Help !! Can't Post

I am having this problem:
I have Perl script that uses a “for” to launch many processes children using “fork”, the problem is that: the children are left zombies, and therefore arrives at a point in which we cannot create more processes .
We thank for any aid that can give us. Our code is:

for ($count = 0; $count <= 100; $count++) {
FORK: {
if ($pid = fork){
# father code ;
} elsif (defined $pid) {
# children code
}
exit ;
} elsif ($! =~ /Resource temporarily unavailable/){
print "Couldn’t create process";
sleep 5;
redo FORK;
} else{
# failure
die "can’t fork: $!\n";
}

}
}



------------------


Omicron
Deleted

Nov 9, 2000, 6:44 AM

Post #2 of 2 (931 views)
Re: fork( ) in Perl Help !! [In reply to] Can't Post

hi,
I have exactly the same problem :-(

Mayby this could help you: $SIG(CHILD) = sub {wait}
It doesn't helped me, but mayby you...

If someone will answer your question, can you please send me an email ?
thx, omicron

omikubi@hotmail.com

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives