Re: How to track the child process's child process and wait it to finish?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: andrea catto' (acatto_at_dataflight.com)
Date: 05/10/04


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
>
>



Relevant Pages

  • Re: Davenport Lyons - Watchdog Report
    ... You may say there is no way you can control access to the ... internet through your connection and monitor what goes on over ... sorts of ways of restricting or monitoring access. ... But seriously - how does a parent control internet access when the child ...
    (uk.legal)
  • Password
    ... Programs such as "Snapshot Spy" are helpfull for those ... that REALLY wish to see what a child is doing on a PC. ... I would do a search on the web for "monitoring software" ...
    (microsoft.public.security)
  • Re: A little girl in need of protection.
    ... In reality all totally worthless. ... Social services will investigate. ... "Monitoring the family" ... the best interests of the child. ...
    (uk.legal)
  • Re: A little girl in need of protection.
    ... In reality all totally worthless. ... Social services will investigate. ... "Monitoring the family" ... the best interests of the child. ...
    (uk.legal)
  • Re: forking in c
    ... the very last child it prints out says it has a parent id ... each child process should have a child process of their own. ... The next statement the child executes is ...
    (comp.unix.programmer)