Is there a cross-platform way to terminate all child (and grandchild) processes when the main process ends abnormally?

21 hours ago 3
ARTICLE AD BOX

It seems that in C#, if my main process starts a child process via Process.Start() , the child process is going to have an independent life cycle to the main process. It doesn't automatically terminate if the main process ends or gets killed.

This answer suggests Job Object. However it's Windows-only. Is there a cross-platform way to ensure all child processes (and their child processes) ending when the main process exits?

Read Entire Article