-
Adam Gundry authored
It appears that CPP macro names are case sensitive, and the code was previously checking for HAVE_posix_spawn_file_actions_addchdir whereas Autoconf defines HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR. This meant that calls to createProcess which set cwd to a Just value would always fail to use posix_spawn and instead fall back on fork, which is problematic when the parent process has a large residency. Testing the fix revealed another issue, which is that _GNU_SOURCE must be defined before any glibc headers are included, otherwise the _np variant provided by glibc will not be declared.
Adam Gundry authoredIt appears that CPP macro names are case sensitive, and the code was previously checking for HAVE_posix_spawn_file_actions_addchdir whereas Autoconf defines HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR. This meant that calls to createProcess which set cwd to a Just value would always fail to use posix_spawn and instead fall back on fork, which is problematic when the parent process has a large residency. Testing the fix revealed another issue, which is that _GNU_SOURCE must be defined before any glibc headers are included, otherwise the _np variant provided by glibc will not be declared.
Loading