Skip to content

ow2-proactive/process-tree-killer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

process-tree-killer

Build Status

Process Tree Killer for Java, extracted from Jenkins (commit 9c443c8d5bafd63fce574f6d0cf400cd8fe1f124)

The trick that is used to kill a process including its children is to tag them using an environment variable.

Usage

ProcessBuilder pb = new ProcessBuilder("sleep", "10000");
pb.environment().put("PTK_COOKIE", "killme");

Process process = pb.start();

ProcessTree.get().killAll(singletonMap("PTK_COOKIE", "killme"));

## Acknowledgements

Thanks to Jenkins and Kohsuke Kawaguchi.

About

Process Tree Killer for Java, extracted from Jenkins

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages