lkml.org 
[lkml]   [2008]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ptrace: it is fun to strace /sbin/init
Date
> It would be fine to allow this unconditionally if there was some mechanism
> to make sure someone else takes over reaping childs while init is ptraced.

I don't see why this particular issue is any special case. The zombie leak
is just one of many ways that the system might become unusable if root does
the wrong thing to an essential system daemon. Caveat superusor. Diddling
with init on a system you expect ever to do anything again is dangerous and
requires great care. The question of allowing an administrator to engage
in dangerous activities is orthogonal to the details of a particular danger.

With today's kernel, init can avoid any reparented zombies collecting if it
doesn't care about its own children either. That is, it can ignore SIGCHLD
or set SA_NOCLDWAIT to make all its children clean themselves up. That
doesn't help for a normal init, which does care (for respawn and logging).
(Also it's never been tried, and I'm almost sure it has a bug. But that's
supposed to be the semantics.)

That said, the orthogonal question of orphan zombies may well be worth
addressing too. Just let's not conflate it with the ptrace question.
(AFAIK there is no good reason not to make orphans just self-reap, it's
just hysterical raisins inherited from the dawn of Unix. I'm sure that
Oleg and I can work out the cleanups, but in a separate thread please.)


Thanks,
Roland


\
 
 \ /
  Last update: 2008-03-25 23:05    [W:0.082 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site