diff mbox series

[hurd,commited] hurd: Try shell in posix_spawn* only in compat mode

Message ID 20201226141339.22864-1-samuel.thibault@ens-lyon.org
State New
Headers show
Series [hurd,commited] hurd: Try shell in posix_spawn* only in compat mode | expand

Commit Message

Samuel Thibault Dec. 26, 2020, 2:13 p.m. UTC
Reported by Bruno Haible <bruno@clisp.org>
---
 sysdeps/mach/hurd/spawni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c
index 178b271e4e..2aeed683fe 100644
--- a/sysdeps/mach/hurd/spawni.c
+++ b/sysdeps/mach/hurd/spawni.c
@@ -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.  */