Re: Parent process switching on debugger abort in 2.0.3x

Matthias Urlichs (smurf@work.smurf.noris.de)
15 Jul 1997 00:03:38 +0200


Philip Gladstone <philip@raptor.com> writes:
> It appears that if a debugger (or strace) aborts without
> sucessfully detaching from the child process, then the child
> process ends up being parented by init (pid 1). I believe
> that this behaviour is incorrect and that if the debugger
> or strace dies, then the target process should end up being
> parented by its 'original' parent.
>
The problem isn't that easily solved.

Suppose, for instance, you kill your debugger, but the beast has written a
few breakpoints into the debuggee. What to do? Right -- either you kill the
child along with the parent (any fatal signal) or it's the debugger's job
to clean up after itself and properly detach the child (any other signal).

I think that's safer than to let the debuggee continue (no matter which
parent). It's better to kill the poor thing now, while it's suspended
someplace safe (hopefully) than to let it continue until it runs into
something it can't handle.

-- 
What fools these morals be!
-- 
Matthias Urlichs         \  noris network GmbH  /  Xlink-POP Nürnberg 
Schleiermacherstraße 12   \   Linux+Internet   /   EMail: urlichs@noris.de
90491 Nürnberg (Germany)   \    Consulting+Programming+Networking+etc'ing
   PGP: 1024/4F578875   1B 89 E2 1C 43 EA 80 44  15 D2 29 CF C6 C7 E0 DE
       Click <A HREF="http://info.noris.de/~smurf/finger">here</A>.    42