From: Bruno Haible Date: Thu, 6 Nov 2025 19:41:07 +0000 (+0100) Subject: posix_spawn-internal: Don't use vfork() on Solaris/SPARC. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbf98b12a1feece09cae9a390c5bdd851e885b9b;p=thirdparty%2Fgnulib.git posix_spawn-internal: Don't use vfork() on Solaris/SPARC. Reported by Pádraig Brady in . * lib/spawni.c (__spawni): Don't use vfork() on Solaris/SPARC. --- diff --git a/ChangeLog b/ChangeLog index 551a7acae0..e40604e420 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-11-06 Bruno Haible + + posix_spawn-internal: Don't use vfork() on Solaris/SPARC. + Reported by Pádraig Brady in + . + * lib/spawni.c (__spawni): Don't use vfork() on Solaris/SPARC. + 2025-11-06 Bruno Haible stdio-windows: Add fallback code for very old mingw without vasprintf. diff --git a/lib/spawni.c b/lib/spawni.c index a1f3f84a98..b99f8eeabb 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -882,7 +882,8 @@ __spawni (pid_t *pid, const char *file, (void) &flags; /* Generate the new process. */ -#if HAVE_VFORK + /* Use of vfork() on Solaris/SPARC crashes; avoid it there. */ +#if HAVE_VFORK && !(defined __sun && defined __sparc) if ((flags & POSIX_SPAWN_USEVFORK) != 0 /* If no major work is done, allow using vfork. Note that we might perform the path searching. But this would be done by