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

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue May 5 15:20:38 GMT 2026



On 05/05/26 12:03, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
> 
>> On 05/05/26 10:05, Cristian Rodríguez wrote:
>>> On Mon, May 4, 2026 at 9:58 AM Adhemerval Zanella Netto
>>> <adhemerval.zanella@linaro.org> wrote:
>>>  (afaik waitid (PIDFD, ...) will signal an error if the process is
>>>> already reaped).
>>>
>>> Yes, it will return ECHILD..afaik.
>>
>> And I am not sure we can change it, because it will subtly change the
>> functions semantics and we will always need a clone fallback (that
>> always send the signal) for ABI that do not have clone3 and on kernel
>> that do not support it.
> 
> I think we could perhaps hide the process launch for wordexp, but not
> for system and popen.  For system and popen, some applications expect to
> see signals.
Indeed the wordexp is an implementation detail to call the shell.

But back to the main RFC, would this be an acceptable change?


More information about the Libc-alpha mailing list