Messages in this thread | | | Date | Sun, 15 Mar 2015 15:52:23 +0100 | From | Oleg Nesterov <> | Subject | Re: [PATCH v2 5/7] clone4: Add a CLONE_AUTOREAP flag to automatically reap the child process |
| |
On 03/15, Josh Triplett wrote: > > Add a CLONE_AUTOREAP flag to request this behavior unconditionally,
Yes, CLONE_AUTOREAP is much better. And I agree (mostly) with that we should rely on do_notify_parent().
Howver the patch still doesn't look right. First of all, ->autoreap should be per-process, not per-thread. And there are ptrace/mt issues, it seems. Just for example, we should avoid EXIT_TRACE if autoreap in wait_task_zombie() even if we are going to re-notify parent.
Yes... and other problems with ptrace. So let me nack this patch for the moment ;) But let me repeat that personally I agree with this change "in general".
EXCEPT: do we really want SIGCHLD from the exiting child? I think we do not. I won't really argue though, but this should be discussed and documented. IIUC, with your patch it is still sent.
Josh, please give me some time to think and re-check, I'll write another email next week. I am not sure this is really needed, but it seems to me that we need the preparation patch to make this change clear/simple.
Oleg.
| |