brettwooldridge / NuProcess

Low-overhead, non-blocking I/O, external Process implementation for Java
Apache License 2.0
710 stars 84 forks source link

Use Job objects in lieu of a shutdown hook on Windows. #133

Open doctorpangloss opened 2 years ago

doctorpangloss commented 2 years ago

Shutdown hooks have bad behavior on Windows. Using Windows Job objects ensure child processes die when the parent process (the NuProcess caller) dies, regardless of the circumstances that caused the JVM running NuProcess died.