I have an exe, where my exe invokes a java app, i have the process id's of this both, exe and java app. When my exe is invoked by other vc++ App(cppApp), My issue is when ever cppApp is closed, it terminates my exe, as my exe is invoking a java app, it is not getting cleaned up. My cppApp is using terminate process to terminate my exe, i have the logic in my exe for cleaning up child process which my exe is invoking, but i think when terminate process is called, it is the hard terminate as we do from task manager and not cleaning up the called process(i.e, java App). Is there any way to terminate both my exe and its calling process gracefully?
Asked
Active
Viewed 79 times
0
-
1Read about job objects, in particular `CreateJobObject`, `AssignProcessToJobObject`, `TerminateJobObject`. – Igor Tandetnik Nov 23 '14 at 05:20
-
1possible duplicate of [How do I automatically destroy child processes in Windows?](http://stackoverflow.com/questions/53208/how-do-i-automatically-destroy-child-processes-in-windows) – Harry Johnston Nov 23 '14 at 06:37
-
@IgorTandetnik :your post helped, thanks – Juseeth Nov 23 '14 at 22:31