I am reading a textbook on parent/child process, and the author says:
If a parent process terminates without reaping its zombie children, then the kernel arranges for the init process to reap them. However, long-running programs such as shells or servers should always reap their zombie children. Even though zombies are not running, they still consume system memory resources.
but according to the answer of this question What does reaping children imply?
it seems that most/all of zombies' resources are released, only one resource that's definitely still consumed is that process table slot. I am not familiar with the process table slot, but I think it stores exit status of zombies.
Anyway, so one record in the process table slot doesn't sound like a big deal, probably just consumes a couple of bytes/kb in memory, so why long-running programs should always reap their zombie children by calling wait
variants?