This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] [GLIBC RFC] clone3: add CLONE3_RESET_SIGHAND
On Wed, Oct 09, 2019 at 02:01:02PM +0200, Florian Weimer wrote:
> * Christian Brauner:
> >> With this construct, the application programmer needs to remember which
> >> flags are old and new (predate and postdate known_flags). It's too easy
> >> to make mistakes there.
> >> What about this?
> >> pid_t pid = clone3 (&args, sizeof (args));
> >> if (pid < 0)
> >> return -1;
> >> if (args.known_flags == 0)
> >> args.known_flags = CLONE3_INITIALLY_SUPPORTED_FLAGS;
> >> if (args.known_flags & NEW_FLAG_I_CARE_ABOUT)
> >> /* Kernel does support the known_flags extension and does
> >> support the feature I care about. */
> >> We could hide this in the clone3 wrapper for glibc if we start out with
> >> a struct clone_args that has this member.
> > So the kernel semantics I suggested but when the kernel does not support
> > it have and doesn't set it have glibc set this?
> > Yeah, that sounds like a good idea to me!
> Good. Please get this into the kernel. 8-)
Will do. :)