So I am writing an application that monitors a console application that was written by another developer. The console application is prone to crashing and because it runs all night i need my application to restart it.
Unfortunaltey when the console app crashes i get the windows message that says "blah has stopped working" And a button that says close program.
I am using System.Diagnostic.Process to start the console application but I cannot determine if the console application has crashed until AFTER the close program button is hit. Process.Responding is always true (there is no windows handle) Process.exited isnt fired till after the close program button is hit.
Any ideas would be greatly helpfull.
Thanks
Disable the windows crash reporting feature. It gets notified by the kernel when a process fails. The process is alive until the crash reporting thingy is done with it.
The feature can be disabled per-process using some API. Disabling Windows error reporting (Dr. Watson) for my process Don't globally disable it to fix a local problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With