Detecting processes spawned by your child?

From a parent process, I’d like to be able to detect when a child process
spawns another process.

Is there a way I might do this (wait of process group ID’s, wait for
signals, wait for specific events, etc.)?

Why would I want to do this?

I’ve built an app that spawns make and cooks the output. I’d like to output
interim status messages to the terminal (using curses) about which tools are
running during the make. In this instance, make spawns qcc which, in turn,
launches a variety of tools (gcc, ld, ar, etc.).

Any help is appreciated.

Thanks!

– Kevin

“Kevin Kahl” <kkahl@gte.net> wrote in message
news:8uu8um$cnb$1@inn.qnx.com

From a parent process, I’d like to be able to detect when a child process
spawns another process.

Is there a way I might do this (wait of process group ID’s, wait for
signals, wait for specific events, etc.)?

Why would I want to do this?

I’ve built an app that spawns make and cooks the output. I’d like to
output
interim status messages to the terminal (using curses) about which tools
are
running during the make. In this instance, make spawns qcc which, in
turn,
launches a variety of tools (gcc, ld, ar, etc.).

If you parse the output of make, wouldn’t that tell you what make is doing.
I’m not sure what you are asking is possible, but even if it would it would
probably open up a can of worms. make call qcc ( so qcc is the child of
make)
and then qcc calls the various compoment so you have a another level. It’s
quite
possible make call itselfs so you’d have:

make
make
qcc
cpp


Any help is appreciated.

Thanks!

– Kevin

Yes? I know all of this. The sub-processes of qcc don’t actually output
enough information for me to be able to tell what they are.

I was really interested to know if there’s a more general, OS level
technique for doing this in the abstract…

– Kevin

“Mario Charest” <mcharest@nosmap.com> wrote in message
news:8uuc69$g5o$1@inn.qnx.com

“Kevin Kahl” <> kkahl@gte.net> > wrote in message
news:8uu8um$cnb$> 1@inn.qnx.com> …
From a parent process, I’d like to be able to detect when a child
process
spawns another process.

Is there a way I might do this (wait of process group ID’s, wait for
signals, wait for specific events, etc.)?

Why would I want to do this?

I’ve built an app that spawns make and cooks the output. I’d like to
output
interim status messages to the terminal (using curses) about which tools
are
running during the make. In this instance, make spawns qcc which, in
turn,
launches a variety of tools (gcc, ld, ar, etc.).


If you parse the output of make, wouldn’t that tell you what make is
doing.
I’m not sure what you are asking is possible, but even if it would it
would
probably open up a can of worms. make call qcc ( so qcc is the child of
make)
and then qcc calls the various compoment so you have a another level. It’s
quite
possible make call itselfs so you’d have:

make
make
qcc
cpp


Any help is appreciated.

Thanks!

– Kevin
\