lkml.org 
[lkml]   [2015]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd
On 03/14, Josh Triplett wrote:
>
> What I was proposing was that a task that isn't yet dead, but that is
> going to be autoreaped, is not eligible for waiting either. All the
> various wait* familiy of system calls should pretend it doesn't exist at
> all, because returning an autoreaped task from a wait* call introduces a
> race condition if the parent tries to *do* anything with the returned
> PID. If you launch a process with CLONE_FD, you need to manage it
> exclusively with that fd, not with the wait* family of system calls.
>
> That also implies that the child-stop and child-continued mechanisms
> (do_notify_parent_cldstop, WSTOPPED, WCONTINUED) should ignore the task
> too. In the future there could be a flag to clone4 that lets you get
> stop and continue notifications through the file descriptor.

So far I strongly disagree, and I think that "autoreap" feature should
not depend on CLONE_FD.

However, as I already said, perhaps something like W_IGNORE_AUTOREAP
for wait* makes sense.

Plus we should also discuss the reparenting. Ok, let me leave this
discussion until I read 0/4 at least.

Oleg.



\
 
 \ /
  Last update: 2015-03-14 21:41    [W:0.793 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site