>>>>> "Thiago" == Thiago Jung Bauermann writes: Thiago> I'm struggling with an issue which perhaps you already faced or Thiago> thought about... I asked around about this, and it turns out that we have a patch in the Fedora SRPM for it. The approach in this patch seems to be racy. Roland says we can do better if we enable exit tracing. I see this in linux-nat.c: /* Do not enable PTRACE_O_TRACEEXIT until GDB is more prepared to support read-only process state. */ I wonder what that means :-) Thiago> 1. Is it true that when the main thread exits but there are other Thiago> threads in the thread group, then no SIGCHLD is generated to notify GDB Thiago> that it exited (perhaps because such a SIGCHLD could be ambiguous and Thiago> mean that the whole process exited)? Yes, Roland said that no SIGCHLD is generated. Thiago> 2. Is there a way for GDB to wait on just the main thread instead of on Thiago> the whole process when it waits on a TID which is also the PID? I guess not. Tom