Hi,
I launch several external process via a call to
Runtime.getRuntime.exec("java myApp");
I monitor the correct launching and execution of the application with some java.concurent.Future. I can tell if the app is launched, in error, stopped. I can stop it.
But, when I kill the main application (the one who launches the others) the several processes of the children applications keep runnning and I lose control on them.
I looking for a way to ensure that when the mother application is stopped / killed / in error, all of the children process are killed as well.
What I have already done :
The main application runs in tomcat, so i listen for the destruction of the context, and kill all subprocesses. But it's not enough: when tomcat is stopped or killed, it's not working.