From: Samuel Thibault Date: Sat, 26 Dec 2020 14:12:04 +0000 (+0100) Subject: hurd: Try shell in posix_spawn* only in compat mode X-Git-Tag: glibc-2.33~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13adfa34aff03fd9f1c1612b537a0d736ddb6c2b;p=thirdparty%2Fglibc.git hurd: Try shell in posix_spawn* only in compat mode Reported by Bruno Haible --- diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index 178b271e4e8..2aeed683fef 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. */