Restart process

I want to restart the program.
I found this process and called the Kill method, after which I ran it again:
process.Kill ();
process.Start ();

It stops, but does not start.
Also, if I set an Exited event, it never fires.
What is the problem?

+4
source share
1 answer

Process.Kill() is asynchronous. You need to call Process.WaitForExit() after calling kill.

+7
source

Source: https://habr.com/ru/post/1444607/


All Articles