I'm just curious, what happens to zombie process, if it's parent doesn't care to wait for it.
Suppose, we've a parent and a child. Child terminates before parent does.
From APUE:
The kernel keeps a small amount of information for every terminating process...Minimally
this information consists of the process ID, the termination status of the process....
Parent is required to fetch this information using waitpid()
.
But if, parent exits without waiting for child, what happens:
Does the kernel delete this information (certainly it's of no use)?
Or, it keeps collecting this junk?
Is this implementation specific?
Or, is there a standard way to deal with this situation?
init process
become parent of child process., init flush entry from process table – Pagoda