[PATCH v8 5/7] posix: Add pidfd_spawn and pidfd_spawnp (BZ 30349)
Florian Weimer
fweimer@redhat.com
Thu Aug 24 18:18:11 GMT 2023
* Adhemerval Zanella Netto:
> On 24/08/23 14:00, Florian Weimer wrote:
>> Please use a separate variable, not args.pidfd, though. The current
>> code depends on the order the kernel sets these fields, I think.
>
> I can move out the pidfd out of posix_spawn_args, but I don't think this
> would change much here. It would be a stack allocated variable in both
> cases, and kernel will just set it if CLONE_PIDFD (afaik there is no
> order involved here).
I'm concerned about this:
>>>>> + .pidfd = use_pidfd ? (uintptr_t) &args.pidfd : 0,
>>>>> + .parent_tid = use_pidfd ? (uintptr_t) &args.pidfd : 0,
&args.pidfd in both cases.
Thanks,
Florian
More information about the Libc-alpha
mailing list