]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Try shell in posix_spawn* only in compat mode
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 26 Dec 2020 14:12:04 +0000 (15:12 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 26 Dec 2020 14:12:04 +0000 (15:12 +0100)
Reported by Bruno Haible <bruno@clisp.org>

sysdeps/mach/hurd/spawni.c

index 178b271e4e80c11fc486471c7313ca7e08a7f7da..2aeed683fefc259b0a550617f6acb795e7dfe558 100644 (file)
@@ -838,7 +838,7 @@ __spawni (pid_t *pid, const char *file,
       err = exec (execfile);
     __mach_port_deallocate (__mach_task_self (), execfile);
 
-    if (err == ENOEXEC)
+    if ((err == ENOEXEC) && (xflags & SPAWN_XFLAGS_TRY_SHELL) != 0)
       {
        /* The file is accessible but it is not an executable file.
           Invoke the shell to interpret it as a script.  */