Re:Killing processes that don't want to die
by daleon on Monday September 24, 2018 @11:04PM
(#18063274)
Is there really no cross-platform way to do this that works o both *nix and windows?
[ Parent
| on HN ]
Re:Killing processes that don't want to die
by lozenge on Tuesday September 25, 2018 @04:10AM
(#18064438)
There isn't even a cross platform way to start a process, never mind killing one.
In Windows you can launch the process in a paused state then assign it a job object which all sub processes will inherit. Then the job object has a function to kill all processes in it.
Re:Killing processes that don't want to die
by boomskats on Tuesday September 25, 2018 @01:07AM
(#18063745)
I'm not sure you fully appreciate the context of the article is around the linux kernel, on LWN.net (a linux news site). The article has no reason to talk about Windows.
If you're really that keen on Windows and need to implement process management functionality in a crossplatform tool, take a look at the Python psutil library, or the all- but-obsoleted SIGAR. That's not really what this article is about though.
Re:Killing processes that don't want to die
by dagenix on Tuesday September 25, 2018 @12:01AM
(#18063491)
I dunno what you are going for - processes function pretty differently on those systems, so, no, there is not a cross-platform way to handle that case since process handling is inherently system specific.
If you are asking if there is some library to do this type of thing - maybe? I dunno. But, even if there is, the articles is talking about how such functionality can be implemented on Linux - which, if such a library existed, would be something that said library would implement.