I have a GUI that has many buttons. Each button creates a Process
(ProcessBuilder.start()
) that send of a predetermined ClearCase command with pre-set arguments.
After calling ProcessBuilder.start()
, I add the process to a list. When the program shuts down, I iterate through this list and call destroy()
on each process. I'm using Runtime.getRuntime().addShutdownHook()
to try to iterate through my list.
However, when I look in Windows Task Manager, I see that some conhost.exe
and cleartool.exe
processes are still alive. I suspect Process.destroy()
is either not working or not propagating. Is there a way to completely clean up the program and kill all subprocesses when the user clicks X?