Re: How to track the child process's child process and wait it to finish?
From: andrea catto' (acatto_at_dataflight.com)
Date: 05/10/04
- Next message: andrea catto': "Re: Access Violatioin detection"
- Previous message: TVR Fan: "Re: casting errors building VC6 project under VS .NET 7.1"
- In reply to: paul: "How to track the child process's child process and wait it to finish?"
- Next in thread: paul: "Re: How to track the child process's child process and wait it to finish?"
- Reply: paul: "Re: How to track the child process's child process and wait it to finish?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 09:35:50 -0700
here's what I personally used as solution.... and it's working yet not the
only solution.
the child will create a 'locked' file.
the monitoring app will monitor this way,
1) either in a polling manner every N time, if that give file exists and NOT
deletable, it's because the child process is running, if it doesnt exist or
the file could be successfully deleted, then the child process died abruptly
or didnt even load.
2) the second way is a non intensive monitoring thread.Windows provides with
a wonderful directory monitoring API called FindFirstChangeNotification(),
you'd use it in compination with for example WaitForSingleObject(), and it
will only return when a given event, such as a file was created or changed,
so in a non cpu intensive way, you'd check if that locked file was created
or deleted.
"paul" <paullee2000@hotmail.com> wrote in message
news:e2rNFqpNEHA.160@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> In my program, I use the function CreateProcessA() and
WaitForSingleObject()
> to create a child process and wait it to finish. How do I keep track if
the
> child process has launched another process? Is there a process Group ID
> (like in UNIX) I can use?
>
> Thank you very much.
>
> Paul
>
>
- Next message: andrea catto': "Re: Access Violatioin detection"
- Previous message: TVR Fan: "Re: casting errors building VC6 project under VS .NET 7.1"
- In reply to: paul: "How to track the child process's child process and wait it to finish?"
- Next in thread: paul: "Re: How to track the child process's child process and wait it to finish?"
- Reply: paul: "Re: How to track the child process's child process and wait it to finish?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|