From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E57FA3858417; Mon, 14 Aug 2023 19:46:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E57FA3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692042418; bh=2DszD28Eik926JcSFYbbv+GR/vzvvEPJbubB6HW0qlI=; h=From:To:Subject:Date:From; b=DJd7/vw6sxlLUICfalDBH5rAQYJYaz7fr/WgSUH54B2zxSQTX/mq5Rx7UbFawebhb izhjCZSDWOhzJfO5zndhpGDZvgob11alq25A/C5AyarAAK76MyN0YqfajZHtvFOuXf S2TdjjOQK0X1NIbUz8f1ZU0hI0AxmzUbiCJExclE= From: "safinaskar at mail dot ru" To: glibc-bugs@sourceware.org Subject: [Bug libc/30759] New: Comment on SPAWN_ERROR is wrong Date: Mon, 14 Aug 2023 19:46:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.40 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: safinaskar at mail dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30759 Bug ID: 30759 Summary: Comment on SPAWN_ERROR is wrong Product: glibc Version: 2.40 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: safinaskar at mail dot ru CC: drepper.fsp at gmail dot com Target Milestone: --- Consider https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dsysdeps/unix/sysv/li= nux/spawni.c;h=3Dec687cb4238bac10a113ab924ea9b05500142b88;hb=3D1b214630ce6f= 7e0099b8b6f87246246739b079cf#l55 . The comment is wrong, because actual value of this macro (SPAWN_ERROR) in fact is never used! Let me tell you why. The only use site of this macro is https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dsysdeps/unix/sysv/li= nux/spawni.c;h=3Dec687cb4238bac10a113ab924ea9b05500142b88;hb=3D1b214630ce6f= 7e0099b8b6f87246246739b079cf#l306 . But, as well as I understand in this place args->err is non-zero. Then in parent we expect this args->err in line https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dsysdeps/unix/sysv/li= nux/spawni.c;h=3Dec687cb4238bac10a113ab924ea9b05500142b88;hb=3D1b214630ce6f= 7e0099b8b6f87246246739b079cf#l417 . It is non-zero, so we fail to __waitpid. __waitpid doesn't save process status, so the status (i. e. SPAWN_ERROR) is never observed. So, I propose removing confusing comment. Also macro SPAWN_ERROR itself sho= uld be removed, too. "_exit (SPAWN_ERROR)" should be replaced with "_exit(1) /* This value is never observed */" --=20 You are receiving this mail because: You are on the CC list for the bug.=