summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/spawni.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index 0391b9bd5e..cf0213ece5 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -404,6 +404,8 @@ __spawni (pid_t * pid, const char *file,
const posix_spawnattr_t * attrp, char *const argv[],
char *const envp[], int xflags)
{
+ /* It uses __execvpex to avoid run ENOEXEC in non compatibility mode (it
+ will be handled by maybe_script_execute). */
return __spawnix (pid, file, acts, attrp, argv, envp, xflags,
- xflags & SPAWN_XFLAGS_USE_PATH ? __execvpe : __execve);
+ xflags & SPAWN_XFLAGS_USE_PATH ? __execvpex :__execve);
}