4 ms·
But as the original article mentions, what about the case where your parent process is killed uncatchably, e.g., with kill -9? Your children may persist, becaus
by PeterWhittaker 3y ago
But as the original article mentions, what about the case where your parent process is killed uncatchably, e.g., with kill -9? Your children may persist, because the parent was not afforded an opportunity to kill them.
- gavinhoward 3y agoNotice that I said I didn't solve the grandchild problem.
- mksybr 3y agoDoesn't kill -9 impact the ability to kill even children, due to not being given time to clean up?
- gavinhoward 3y agoYes, but at that point, it is the problem of the grandparent, which isn't dead.
- catern 3y agoWhen a process does, its children are reparented to init, not to its parent. So the grandparent can do nothing.
- gavinhoward 3y agoYes, I know. But leaking grandchildren is still a problem for the grandparent.
- deleted 3y ago[deleted]
- PeterWhittaker 3y agoI’m not referring to grandchildren: if you have parent P with children C1 and C2 and P receives -9, P dies and C1 and C2 persist.
- gavinhoward 3y agoYes, but if a process gets a SIGKILL, the user is explicitly saying that they don't want that process to do anything else. Otherwise, they would send a SIGTERM. So a SIGKILL is really the user passing the responsibility of the children onto some other process.