Go to file
Brendan Shanks 7ab022f6e6 libiberty: Use posix_spawn in pex-unix when available.
Hi,

This patch implements pex_unix_exec_child using posix_spawn when
available.

This should especially benefit recent macOS (where vfork just calls
fork), but should have equivalent or faster performance on all
platforms.
In addition, the implementation is substantially simpler than the
vfork+exec code path.

Tested on x86_64-linux.

v2: Fix error handling (previously the function would be run twice in
case of error), and don't use a macro that changes control flow.

v3: Match file style for error-handling blocks, don't close
in/out/errdes on error, and check close() for errors.

libiberty/
	* configure.ac (AC_CHECK_HEADERS): Add spawn.h.
	(checkfuncs): Add posix_spawn, posix_spawnp.
	(AC_CHECK_FUNCS): Add posix_spawn, posix_spawnp.
	* aclocal.m4, configure, config.in: Rebuild.
	* pex-unix.c [HAVE_POSIX_SPAWN] (pex_unix_exec_child): New function.
2025-01-16 21:32:27 -05:00
autoconf Congrats svn_load_dirs.pl, this change just disappeared. 2008-03-19 13:01:56 +00:00
binutils binutils: fix register lookup table for ppc 2023-10-19 16:28:02 +00:00
gcc libiberty: Use posix_spawn in pex-unix when available. 2025-01-16 21:32:27 -05:00
jam jam: mirror Jamfile in Makefile. 2025-01-01 09:19:56 +00:00
legacy Add -rdynamic as a no-op, similar to -pthread. 2023-05-08 22:27:04 +12:00
libtool Added support for Haiku x86 target. 2005-12-05 14:02:23 +00:00
.gitignore * Add .gitignore. 2014-07-21 11:18:25 +02:00