* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [000825 03:14] wrote:
> Hello,
> 
> I have some ideas to improve fork()-ing and getting rid of zombie processes.
> This things mentioned here are proposed of a man that do not know very well
> (author means 'the depths' of) BSD kernel source although he have some ex-
> pirience with it (mainly in reading it :-).
> 
> By definition zombie is a process entry in proc table that wasn't released
> by wait*() called form the parent's code. So all we need to do is to ensure
> that parent will call wait*() as many times as it called fork(). This meth-
> od have some advantages but it has some disadvantages too. First of all,
>  we 
> provide programmers & all users with full out-of-zombies enviroment where 
> everything created will be destroyed in the right way. Second, proposed 
> me-
> thod is easy to include in current source with minnor modifications.
> 

[snip]

If a parent that has zombie children exits the kernel will attach them
to init (I haven't checked, but this is the common unix solution).  
init will be calling waitpid to clear zombies automagically.

So this sorta already happens. :)

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to