diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/posix/spawni.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/spawni.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/posix/spawni.c b/sysdeps/posix/spawni.c index 36bb5b4f78..b138ab4393 100644 --- a/sysdeps/posix/spawni.c +++ b/sysdeps/posix/spawni.c @@ -310,6 +310,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); } 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); } |