[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: the best form to wait the finish of execution of a child...
From:       Peter Jeremy <PeterJeremy () optushome ! com ! au>
Date:       2005-03-31 7:43:47
Message-ID: 20050331074347.GF71384 () cirb503493 ! alcatel ! com ! au
[Download RAW message or body]

On Wed, 2005-Mar-30 16:06:55 -0400, zean zean wrote:
>Dirk-Willem My idea is to avoid all the processes zombies.  thanks by
>the recommendation.

If you just want to avoid zombies and don't care about the return
status, you can set SIGCHLD to SIG_IGN with SA_NOCLDWAIT (see
sigaction(2)) and not have to use wait() at all.

Note that if you don't bother to wait() for children and don't otherwise
keep track of how many children you have, you can run into overload
problems if you start creating children faster than they complete.

-- 
Peter Jeremy
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic