I am creating a process P1 by using Process P1= Runtime.exec(...)
. My process P1 is creating another process say P2, P3....
Then I want to kill process P1 and all the processes created by P1 i.e. P2, P3...
P1.destroy()
is killing P1 only, not its sub processes.
I also Googled it and found it's a Java bug: https://bugs.java.com/bugdatabase/view_bug?bug_id=4770092
Does anyone have any ideas on how to do it?