2

I have a function KillProcessTree(int ParentPID). Which receives PID of a process.

Now, I have scenario
where, P1 process is parent process and P2, P3 & P4 are child and grand child processes of P1.

P1 --> P2 --> P3 --> P4

For some reason P2 process is being killed, so P3 process becomes as an orphan process.

Now, in KillProcessTree () function I want to kill orphan P3 & P4 processes.

So, is there any way to achieve this in Windows platform?

Kindly please guide me for the same.

Regards, Amol

user3253461
  • 61
  • 1
  • 1
  • 7

0 Answers0