This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] clone3: add CLONE3_CLEAR_SIGHAND
- From: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>
- To: Aleksa Sarai <cyphar at cyphar dot com>
- Cc: Christian Brauner <christian dot brauner at ubuntu dot com>, Linux Kernel <linux-kernel at vger dot kernel dot org>, Oleg Nesterov <oleg at redhat dot com>, Florian Weimer <fweimer at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Ingo Molnar <mingo at redhat dot com>, Peter Zijlstra <peterz at infradead dot org>, Juri Lelli <juri dot lelli at redhat dot com>, Vincent Guittot <vincent dot guittot at linaro dot org>, Dietmar Eggemann <dietmar dot eggemann at arm dot com>, Steven Rostedt <rostedt at goodmis dot org>, Ben Segall <bsegall at google dot com>, Mel Gorman <mgorman at suse dot de>, Shuah Khan <shuah at kernel dot org>, Andrew Morton <akpm at linux-foundation dot org>, Michal Hocko <mhocko at suse dot com>, Elena Reshetova <elena dot reshetova at intel dot com>, Thomas Gleixner <tglx at linutronix dot de>, Roman Gushchin <guro at fb dot com>, Andrea Arcangeli <aarcange at redhat dot com>, Al Viro <viro at zeniv dot linux dot org dot uk>, "Dmitry V. Levin" <ldv at altlinux dot org>, linux-kselftest at vger dot kernel dot org
- Date: Sat, 12 Oct 2019 08:53:34 +0200
- Subject: Re: [PATCH 1/2] clone3: add CLONE3_CLEAR_SIGHAND
- References: <20191010133518.5420-1-christian.brauner@ubuntu.com> <CAHO5Pa3V7fDb_+U-v+LB+TeAU0vfJyUMs9mD4ZqUtbLpZcD4nA@mail.gmail.com> <20191011221208.5eglbazksfigliob@yavin.dot.cyphar.com>
- Reply-to: mtk dot manpages at gmail dot com
Hello Aleksa,
On Sat, 12 Oct 2019 at 00:12, Aleksa Sarai <cyphar@cyphar.com> wrote:
>
> On 2019-10-11, Michael Kerrisk <mtk.manpages@gmail.com> wrote:
> > Why CLONE3_CLEAR_SIGHAND rather than just CLONE_CLEAR_SIGHAND?
>
> There are no more flag bits left for the classic clone()/clone2() (the
> last one was used up by CLONE_PIDFD) -- thus this flag is clone3()-only.
Yes, I understand that. But, I'm not sure that the "3" in the prefix
is necessary. "CLONE_" still seems better to me.
Consider this: sometime in the near future we will probably have time
namespaces. The new flag for those namespaces will only be usable with
clone3(). It should NOT be called CLONE3_NEWTIME, but rather
CLONE_NEWTIME (or similar), because that same flag will presumably
also be used in other APIs such as unshare() and setns(). (Hmm -- I
wonder if we are going to need a new unshare2() or some such...)
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/