From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 80F40385737C; Mon, 8 Aug 2022 17:32:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80F40385737C From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug stdio/29459] New: fwrite does not return EPIPE when underlying write fails with EPIPE. Date: Mon, 08 Aug 2022 17:32:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: stdio X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: NEW 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 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 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, 08 Aug 2022 17:32:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29459 Bug ID: 29459 Summary: fwrite does not return EPIPE when underlying write fails with EPIPE. Product: glibc Version: 2.36 Status: NEW Severity: normal Priority: P2 Component: stdio Assignee: unassigned at sourceware dot org Reporter: carlos at redhat dot com Target Milestone: --- This was reported downstream for CentOS 9 Stream here: https://bugzilla.redhat.com/show_bug.cgi?id=3D2112672 The issue is an upstream issue that needs review. The test case is attached from the downstream issue. An strace shows the issue clearly: 1659979752.806415 write(1, "hello\n", 6) =3D 6 1659979752.806467 write(2, "1. fwrite wrote 6 bytes and ferror is 0\n", 40)= =3D 40 1659979752.806517 write(1, "hello\n", 6) =3D -1 EPIPE (Broken pipe) 1659979752.806548 --- SIGPIPE {si_signo=3DSIGPIPE, si_code=3DSI_USER, si_pid=3D202616, si_uid=3D1000} --- 1659979752.806563 write(2, "2. fwrite wrote 6 bytes and ferror is 1\n", 40)= =3D 40 The underlying write fails with EPIPE, but fwrite doesn't itself fail. --=20 You are receiving this mail because: You are on the CC list for the bug.=