From: Charles Calvert Date: 2010-09-24T09:35:09+09:00 Subject: Re: Getting notification that a subprocess is killed on Windows On Fri, 3 Sep 2010 11:07:14 -0500, Ralph Shnelvar wrote in <293682148.20100903100713@dos32.com>: >[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? [snip code] >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 (using IronRuby). 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 function WaitForSingleObject . 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). . -- Charles Calvert Moderator - alt.computer.consultants.moderated Submission Address: accm@celticwolf.net Contact Address: accm_mod@celticwolf.net