[Haskell-cafe] how to terminate a (Posix) process and all its subprocesses?
david.feuer at gmail.com
Tue Jul 24 19:26:16 UTC 2018
If the process is not thought to be hostile, I imagine it's best to first
try signaling only the parent, and only signal the group if necessary.
Otherwise, you may prevent it from cleaning up after itself properly. Dunno
how to wait for the group to die.
On Tue, Jul 24, 2018, 3:21 PM Bardur Arantsson <spam at scientician.net> wrote:
> On 2018-07-24 15:42, Johannes Waldmann wrote:
> > Dear Cafe,
> > I am using
> > to start an external command, and wait for its completion.
> If the process is hostile (e.g. fork bomb + countermeasures), then the
> *only* realiable way to do this is to use cgroups.
> Obviously, this applies to Linux only. I'm not sure there's actually any
> truly POSIX way to reliably kill hostile sub-processes. I don't think
> so. (The progress group thing doesn't work if the process is hostile.
> It'll work fine otherwise.)
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe