Hi Szymek,

If you're manually killing the parent process using the Windows 2000/XP
task manager, selecting "End Process Tree" rather that "End Process"
from the context menu will usually do the trick.

If you're hoping to have it all happen automatically, as far is I know
there's no inbuilt facility in place that will make this happen. If
you're feeling brave, there are couple of avenues you could explore
including -
* Having a simple watchdog process keep an eye over the main process and
its children.
* Have each child access the process handle of the parent and keep an
eye out for it's termination.
* Devise a solution using win32 Job objects (see CreateJobObject,
AssignProcessToJobObject and friends) in combination with one of the
first two methods.

Cheers,

Mark.

> -----Original Message-----
> From: Moderated discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED]] On Behalf Of
> Szymek Madejczyk
> Sent: Friday, 20 September 2002 7:23 AM
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] Killing child proces at exit
>
>
> Is there any possibility to kill child process when parent
> process isn't finishing normally but it's being killed.
>
> Szymek
>
> You can read messages from the Advanced DOTNET archive,
> unsubscribe from Advanced DOTNET, or subscribe to other
> DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to