Making threads die quickly
Posted Aug 22, 2002 9:35 UTC (Thu) by
jcownie (guest, #3374)
Parent article:
Making threads die quickly
Of course the real problem here is in the ptrace implementation
forcing the re-parenting of processes. That is just plain wrong,
and prevents some codes from working as expected when being debugged.
For instance consider a code which forks and whose child is
debugged. When the child process exits the debugger receives
the SIGCHLD, not the parent, and the parent therefore behaves differently
than it would if the child process were not being debugged.
Reparenting debugged processes is a "neat hack" to make the
ptrace implementation easier, but it's not really the right solution.
(And AFAIK no other unix systems behave this way).
As someone who works on debuggers, I can tell you that we've had
complaints that our product doesn't work right which are a direct
result of this ptrace hack (and which we therefore can't fix in our
debugger :-( ).
(
Log in to post comments)