New Process, how to check if Parent is still alive?

I’m launching a new process to handle my plugin bridge, and it works. I can check if the process is alive at any time and re-launch it if the bridged plugin crashes. But, I noticed that if the original launcher code crashes, the external process keeps running. I thought Windows would take care of all processes launched from one code and kill them all if it crashes. But from my tests, it seems that Windows doesn’t care. So, is, my question is, can I check in a new process if the parent is still alive? I know I could just create a new named pipe and do some heart-beat check, but sometimes the code could block something out and take longer to reply and it would be a bit problematic to rely solely on that…

Anyway, thanks for any advice.

Cheers, WilliamK

The heartbeat/ping approach is the one taken in juce::ConnectedChildProcess.
I think if that happens on a background thread you should be ok.

But yes, you need to terminate your child process if the parent dies, the OS doesn’t do that automatically.

Thanks, I will check that out out. :slight_smile: