public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.35/master] linux: Fix posix_spawn return code if clone fails (BZ#29109)
Date: Fri,  6 May 2022 14:12:10 +0000 (GMT)	[thread overview]
Message-ID: <20220506141210.279183856DF0@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5c0d94d780598a298c9e8685fd811fab9664c368

commit 5c0d94d780598a298c9e8685fd811fab9664c368
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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);


                 reply	other threads:[~2022-05-06 14:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220506141210.279183856DF0@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).