[RFC] posix: Make system, popen, and wordexp try pidfd_spawn first (BZ 34001)

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon May 4 13:58:49 GMT 2026



On 04/05/26 10:49, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> This patch updates system, popen, and wordexp to use a new internal
>> process management abstraction (__spawn_process_create, __spawn_process_wait,
>> and __spawn_process_kill) that leverages pidfd_spawn on supported Linux
>> kernels before falling back to traditional posix_spawn.
> 
> How does this change the way SIGCHLD is delivered?
It uses pidfd_spawn internally, which still uses '.exit_signal = SIGCHLD,'. We 
can an internal-only interface to remove it, but I am not sure if this is really
required (afaik waitid (PIDFD, ...) will signal an error if the process is
already reaped).

And this lead to another question: should we omit SIGCHLD on pidfd_spawn?


More information about the Libc-alpha mailing list