問題:
I'm creating new processes using System.Diagnostics.Process
class from my application.我正在使用我的應用程序中的System.Diagnostics.Process
類創建新進程。
I want this processes to be killed when/if my application has crashed.我希望在/如果我的應用程序崩潰時終止此進程。 But if I kill my application from Task Manager, child processes are not killed.但是,如果我從任務管理器中終止我的應用程序,則不會終止子進程。
Is there any way to make child processes dependent on parent process?有沒有辦法讓子進程依賴於父進程?
解決方案:
參考一: https://en.stackoom.com/question/E1eP參考二: https://stackoom.com/question/E1eP