diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-05-02 12:39:43 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-05-06 10:48:30 -0300 |
commit | 71e2a681f18f617ab962bf8a139bd86d4d440e22 (patch) | |
tree | 836866465c1a839c3d436d86705ce5c9aa2555db /sysdeps/unix/sysv | |
parent | 050cc5f7c1fc30ae2a071282faed9b6a68ca95ba (diff) | |
download | glibc-71e2a681f18f617ab962bf8a139bd86d4d440e22.zip glibc-71e2a681f18f617ab962bf8a139bd86d4d440e22.tar.gz glibc-71e2a681f18f617ab962bf8a139bd86d4d440e22.tar.bz2 |
linux: Fix posix_spawn return code if clone fails (BZ#29109)
The __clone_internal returns the error on errno.
Checked on x86_64-linux-gnu.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/linux/spawni.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index d703485..d6f5ca8 100644 --- a/sysdeps/unix/sysv/linux/spawni.c +++ b/sysdeps/unix/sysv/linux/spawni.c @@ -409,7 +409,7 @@ __spawnix (pid_t * pid, const char *file, __waitpid (new_pid, NULL, 0); } else - ec = -new_pid; + ec = errno; __munmap (stack, stack_size); |