1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

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.
This commit is contained in:
Adhemerval Zanella
2022-05-02 12:39:43 -03:00
parent 050cc5f7c1
commit 71e2a681f1

View File

@@ -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);