Process.HasExited returns true even though process is running?

后端 未结 11 2106
忘掉有多难
忘掉有多难 2020-12-15 03:41

I have been observing that Process.HasExited sometimes returns true even though the process is still running.

My code below starts a proces

11条回答
  •  悲哀的现实
    2020-12-15 04:02

    Use process_name.Refresh() before checking whether process has exited or not. Refresh() will clear all the cached information related to the process.

提交回复
热议问题