|
|
Subscribe / Log in / New account

Killing processes that don't want to die

Killing processes that don't want to die

Posted May 29, 2018 19:27 UTC (Tue) by ebiederm (subscriber, #35028)
In reply to: Killing processes that don't want to die by hawski
Parent article: Killing processes that don't want to die

The practical problem with killbelow is that a child can daemonize itself and then not be your child. So even if you could kill every child escaping from being killed is still straight forward.


to post comments

Killing processes that don't want to die

Posted May 29, 2018 19:31 UTC (Tue) by hawski (guest, #121884) [Link]

It's covered by this part:

> killbelow() is most useful if a process calling it is a reaper for its descendant processes. Reaper status can be acquired by using procctl(2) with PROC_REAP_ACQUIRE or prctl(2) with PR_SET_CHILD_SUBREAPER.

But yes, with this it's quite close to just using namespaces.

Killing processes that don't want to die

Posted May 29, 2018 20:00 UTC (Tue) by ay (guest, #79347) [Link]

With sufficient capability you can PTRACE_SEIZE a process and become its parent, but that doesn't do much good for children of children and so on.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds