On 19/11/19(Tue) 11:22, Martin Pieuchot wrote: > When debugging a multi-threaded process with egdb(1), exiting the > debugger generally result in this: > > PID TID PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND > 15448 242044 10 0 64M 179M idle fsleep 0:11 0.00% > soffice.bin > 15448 251679 10 0 64M 179M stop/2 - 0:00 0.00% > soffice.bin > 15448 367261 2 0 64M 179M stop/3 - 0:00 0.00% > soffice.bin > 15448 203267 2 0 64M 179M stop/0 - 0:00 0.00% > soffice.bin > 15448 128499 10 0 64M 179M stop/1 - 0:00 0.00% > soffice.bin > 15448 369455 2 0 64M 179M stop/1 - 0:00 0.00% > soffice.bin > > One or many threads are still in 'stop'. I need to manually send a SIGCONT > for the process to exit. > > Any idea?
After reading kernel ptrace(2) and signal code it seems to me that PT_DETACH doesn't handle multi-threaded processes that are in SSTOP correctly. This makes me wonder if `p_xstat' shouldn't be move to "struct process".
