From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D0CA3858C53; Mon, 2 May 2022 13:46:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D0CA3858C53 From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/29109] posix_spawn() always returns 1 (EPERM) on clone() failure Date: Mon, 02 May 2022 13:46:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: adhemerval.zanella at linaro dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2022 13:46:45 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29109 --- Comment #3 from Adhemerval Zanella --- Yes(In reply to Alexey Izbyshev from comment #2) > > I think the best option here is to make __clone_internal not change err= no and just return the error as negative errno. >=20 > FWIW, all current code in glibc seems to use __clone_internal as a typica= l C > function, i.e. expecting it return -1 and set errno on error. It's not cl= ear > to me why changing that would be the best option (compared to just fixing > posix_spawn() to use errno instead of negating the return value). The only another usage is on pthread_create, but just using errno seems the simplest solution indeed. --=20 You are receiving this mail because: You are on the CC list for the bug.=