Re: Monitor a child process of a parent process,...
- From: "Gary Chanson" <gchanson@xxxxxxxxxxxxxxxx>
- Date: Thu, 12 Apr 2007 13:46:27 -0400
"Kerem Gümrükcü" <kareem114@xxxxxxxxxxx> wrote in message
news:Oy1lQ$RfHHA.1388@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
how do i programmatically monitor a child process
of a parent process? I assume that i have to use
some of the synchronistaion functions like
"WaitForSingleObject(...)." I want to start monitoring
right when the parent process starts the child process.
And i want to catch the processess termination.
In my case the parent is a console (cmd.exe) and the
child is some Win32 Application i wrote, that on
successfully execution finishes returns "0" and on Error
the result of GetLastError(). What do you recommend,...
The command line is the following:
cmd.exe getobjectnamespaces.exe > LastObjects.log
Parent here is of course the "cmd.exe" and the child is
the"getobjectnamespaces.exe".
I want to catch the "getobjectnamespaces.exe" termination.
I know that i could use some sort of output redirection
with Handles/Pipes, CreateProcess, ReadFile/Console/Pipe, etc,
but i wont for some special reasons. I use the redirection
operator in my case...
Open a handle to the process and wait for it to be signaled.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
.
- Follow-Ups:
- Re: Monitor a child process of a parent process,...
- From: Kerem Gümrükcü
- Re: Monitor a child process of a parent process,...
- References:
- Monitor a child process of a parent process,...
- From: Kerem Gümrükcü
- Monitor a child process of a parent process,...
- Prev by Date: Receiving DBT_DEVICEARRIVAL with DBT_DEVTYP_VOLUME in a service?
- Next by Date: Re: Track down name of parent process
- Previous by thread: Monitor a child process of a parent process,...
- Next by thread: Re: Monitor a child process of a parent process,...
- Index(es):
Relevant Pages
|