On 2/16/24 07:56, Iain Sandoe wrote:
tested on x86_64-darwin, so far. OK for trunk if regression test is
successful on Linux too?
thanks
Iain

--- 8< ---

r14-5310-g879cf9ff45d940 introduced some new handling for spawning sub
processes.  The return value from the generic exec_child is examined
and needs to be < 0 to signal an error. However, the unix flavour of
this routine is returning the PID value set from the posix_spawn{p}.

This latter value is undefined per the manual pages for both Darwin
and Linux, and it seems Darwin, at least, sets the value to some
usually positive number (presumably the PID that would have been used
if the fork had succeeded).

The fix proposed here is to set the pid = -1 in the relevant error
paths.

        PR other/113957

libiberty/ChangeLog:

        * pex-unix.c (pex_unix_exec_child): Set pid = -1 in the error
        paths, since that is used to signal an erroneous outcome for
        the routine.
I wonder if that's what's been causing the native emulated PA builds to fail. It's definitely related to that code. Never saw it on any of the other native emulated targets through.

OK
jeff


Reply via email to