EDN Admin
Well-known member
Hello everyone,
Im launching a cmd line script from a c# application with:
cmd /c randomscript.cmd
I save the PID so i can later kill it but, since the "randomscript.cmd" launches other applications, the application doesnt actually stop when i kill it (because the other applications launched by my randomscript.cmd).
Basically, ive found that i should look for all the childs associated with a given PID so i can then kill them.
Does anybody know how i can do this?
I have an example for getting the parent id for a given child but thats exactly the opposite from what i want to achieve: i want the CHILD for the given Parent!
Thanks in advance!
Luís Silva
View the full article
Im launching a cmd line script from a c# application with:
cmd /c randomscript.cmd
I save the PID so i can later kill it but, since the "randomscript.cmd" launches other applications, the application doesnt actually stop when i kill it (because the other applications launched by my randomscript.cmd).
Basically, ive found that i should look for all the childs associated with a given PID so i can then kill them.
Does anybody know how i can do this?
I have an example for getting the parent id for a given child but thats exactly the opposite from what i want to achieve: i want the CHILD for the given Parent!
Thanks in advance!
Luís Silva
View the full article