[GoLUG] *** Was: Linux Campfire Tales and now is a small Zombie Apocalypse of the process table
Kyle Terrien
kyleterrien at gmail.com
Fri Apr 5 16:42:32 EDT 2024
On 4/5/24 13:19, David Billsbrough wrote:
> My understanding is that parent process runs and creates a child
> process and then at some point in the future termintates and then
> the child process has no one to return its final exit code to return
> to whom spawned it. ... or something like that!!
Yeah, those are orphans, a similar concept. Zombies exit before their
parent processes. Orphans, on the other hand, outlive their parent
processes.
When a process is orphaned, it is re-parented to PID 1, which runs a
special init process. You can also have orphaned zombies: if a process
exits, and its parent exits without ever calling wait() on the process,
then the process gets re-parented to PID 1. It becomes an orphan and a
zombie.
For that reason, one of the duties of PID 1 is to call wait() on its
children to cleanup orphaned zombies.
I can't remember how Void integrates runit (does it bootstrap off of
Miquel van Smoorenburg's init, is it using suckless sinit, or something
else unusual?), and I wasn't present at the story. So, it sounds
unusual that PID 1 isn't reaping children.
--
[*] Kyle Terrien
Containerizing chaos to get to the root of the problem.
@ kyle at terren.us
@ kyleterrien at gmail.com
W https://terren.us/
More information about the GoLUG
mailing list