lkml.org 
[lkml]   [2009]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] Disable CLONE_PARENT for init
On 07/01, Roland McGrath wrote:
>
> > When global or container-init processes use CLONE_PARENT, they create a
> > multi-rooted process tree.
>
> I take this to be the real motivation for your change.
> But you don't mention it in the code comment.
>
> > + * Swapper process sets the handler for SIGCHLD to SIG_DFL. If init
> > + * creates a sibling and the sibling exits, the SIGCHLD is sent to
> > + * the swapper (since the swapper's handler for SIGCHLD is SIG_DFL).
> > + * But since the swapper does not reap its children, the zombie will
> > + * remain forever. So prevent init from using CLONE_PARENT.
>
> This would be fixed by having swapper set its SIGCHLD to SIG_IGN instead,
> so such children self-reap. That seems like the better fix for that.

This won't fix the problem. The child won't autoreap itself if ->exit_signal
!= SIGCHLD.

> If you want to make this change because of container-init issues, I think
> you should just say so independent of this global-init case.

Yes, agreed, the comment looks confusing.

Oleg



\
 
 \ /
  Last update: 2009-07-01 10:31    [W:0.057 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site