]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
posix_spawn-internal: Don't use vfork() on Solaris/SPARC.
authorBruno Haible <bruno@clisp.org>
Thu, 6 Nov 2025 19:41:07 +0000 (20:41 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 6 Nov 2025 19:41:07 +0000 (20:41 +0100)
Reported by Pádraig Brady <P@draigBrady.com> in
<https://lists.gnu.org/archive/html/coreutils/2025-11/msg00052.html>.

* lib/spawni.c (__spawni): Don't use vfork() on Solaris/SPARC.

ChangeLog
lib/spawni.c

index 551a7acae00ebd0c0255894d6994fdcd8c80c9bf..e40604e420a4ad5740dd019e23d82227c4182390 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-11-06  Bruno Haible  <bruno@clisp.org>
+
+       posix_spawn-internal: Don't use vfork() on Solaris/SPARC.
+       Reported by Pádraig Brady <P@draigBrady.com> in
+       <https://lists.gnu.org/archive/html/coreutils/2025-11/msg00052.html>.
+       * lib/spawni.c (__spawni): Don't use vfork() on Solaris/SPARC.
+
 2025-11-06  Bruno Haible  <bruno@clisp.org>
 
        stdio-windows: Add fallback code for very old mingw without vasprintf.
index a1f3f84a98bdd862978253db31191de85d3646f2..b99f8eeabbc956d27ce7a4f27149960eb75c0e09 100644 (file)
@@ -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