> > As the spawning process, you should be able to do something like so: >
[snip 7 step process] BTW - if you're only interested in knowing that the child process exited, but don't need to distinguish between a normal exit and an abnormal one due to an unhandled exception, then you can omit steps 3-5 (using an IOCP and thread to receive notifications from the job object). The silently-die-on-unhandled-exceptions limit of job objects will ensure that the process exits immediately w/o displaying the modal message box, so your managed WaitForProcessExit will still work the way it does for normal exits. But if you want to distinguish between the two kinds of exits, then you'll need to use an IOCP and a thread to wait for notifcations (specifically, JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS). BTW, I found & dusted off my code (C++) that demonstrates this feature (wrote it back in '99). It still works as advertised on XP Pro & Windows Server 2003. If you're interested in it, ping me off-list. -Mike http://www.bearcanyon.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com