Hi,
I need to execute and terminate/abort different shell scripts from inside Java (>= 1.5; ProcessBuilder). With the standard java mechanisms I am only able to kill the main process used for the shell script execution. When this shell script starts other processes (for instance ./foo.sh &; ./bar.sh &) then there processes are still running when I terminate/abort the main shell script process inside Java.
How can I track all IDs from all new sub-/child-processes from inside Java? Is there any posible way to do this? Or is it possible (in *nix- and Win-OSes) to find all processes produced by one known process?
Thanks, Thomas