I have been observing that Process.HasExited sometimes returns true even though the process is still running.
Process.HasExited
true
My code below starts a proces
Use process_name.Refresh() before checking whether process has exited or not. Refresh() will clear all the cached information related to the process.
process_name.Refresh()
Refresh()