On Fri, 3 Sep 2010 11:07:14 -0500, Ralph S. [email protected]
wrote in [email protected]:
[Note: parts of this message were removed to make it a legal post.]
What is the proper way, under Windows, to detect that a process was killed? Crashed?
All that is TRAP’d is EXIT. Worse, @child_process_return_status.exitstatus is zero.
To get any level of detail for something like this, you’re going to
have to use the Windows API directly or perhaps via the .NET stack
The following article contains code for doing this using C++ and the
Win32 API. Note that it implements a process monitor, which may be
more than you’re trying to do.
If you just want to monitor a single process, have a look at the API
Also, check this article for the function named TerminateApp() (ignore
the stuff with “16” in the name - it’s for 16/32 bit versions of
Windows like Windows95). http://support.microsoft.com/kb/178893.