4 ms·
Two scenarios where this breaks: * parent process is killed after it forks, but before it calls `waitpid`. Nothing even attempts to kill&wait for the child *
by matklad 3y ago
Two scenarios where this breaks:
* parent process is killed after it forks, but before it calls `waitpid`. Nothing even attempts to kill&wait for the child
* parent process is killed after it issues `waitpid` syscall. The child continues to happily execute while the parent is dead.
- pjmlp 3y ago- waitpid returns after timeout, assume the process is dead, collect all zombie processes just in case. - yeah this one is a bummer, write the child pids, collect them via a watchdog process