2004-10-14 18:26:11

by Chris Friesen

[permalink] [raw]
Subject: odd behaviour with SIGCHLD and CLD_TRAPPED

I've been playing around a bit with monitoring a child process.

If I send the child a SIGSTOP, the parent gets sent SIGCHLD with si_code == 5.
If I send SIGCONT, the parent gets si_code == 6.

So far so good.

However, if I attach gdb to the child, or detach gdb from the child, the parent
gets no notification. It would seem useful for the parent to know that this has
happened, so it knows that the child may not be running properly.

Is there any way to get this information?

Thanks,

Chris