This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [GLIBC RFC] clone3: add CLONE3_RESET_SIGHAND
* 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?
Exactly.
> Yeah, that sounds like a good idea to me!
Good. Please get this into the kernel. 8-)
Thanks,
Florian