Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: fork exits prematurely leaving zombies

by zude (Scribe)
on May 11, 2004 at 22:57 UTC ( [id://352615]=note: print w/replies, xml ) Need Help??


in reply to fork exits prematurely leaving zombies

So the parent forks C, then forks B, then does A. When A is finished, then B and C will be reaped, meanwhile if they are already done then they are zombies.

Would be cleaner to:

if (!fork) { <process A>; exit } if (!fork) { <process B>; exit } if (!fork) { <process C>; exit } # parent waits for A, B, and C 1 while wait() > 0;

Replies are listed 'Best First'.
Re: Re: fork exits prematurely leaving zombies
by perllearner (Novice) on May 13, 2004 at 01:10 UTC
    thanks zude and steve for your responses. i think i now got it working (hopefully).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found