From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 279183856DF0; Fri, 6 May 2022 14:12:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 279183856DF0 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/release/2.35/master] linux: Fix posix_spawn return code if clone fails (BZ#29109) X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/release/2.35/master X-Git-Oldrev: 059e36d9ed5f5c3c6fc1ab8e12cd0cf226dd3e0a X-Git-Newrev: 5c0d94d780598a298c9e8685fd811fab9664c368 Message-Id: <20220506141210.279183856DF0@sourceware.org> Date: Fri, 6 May 2022 14:12:10 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2022 14:12:10 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5c0d94d780598a298c9e8685fd811fab9664c368 commit 5c0d94d780598a298c9e8685fd811fab9664c368 Author: Adhemerval Zanella Date: Mon May 2 12:39:43 2022 -0300 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. (cherry picked from commit 71e2a681f18f617ab962bf8a139bd86d4d440e22) Diff: --- sysdeps/unix/sysv/linux/spawni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index d703485e3f..d6f5ca89cd 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);