Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2022 15:26:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 76398] [libc] stdio can lose data in the presence of signals
Message-ID:  <bug-76398-227-Fl9tM1KE5E@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-76398-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-76398-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D76398

--- Comment #6 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3D86a16ada1ea608408cec370171d9f5935=
3e97c77

commit 86a16ada1ea608408cec370171d9f59353e97c77
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-23 06:52:59 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-01-25 15:26:05 +0000

    __sflush(): on write error, if nothing was written, reset FILE state ba=
ck

    otherwise the data is just dropped.  Check for current position equal to
    the buffer base at the entry of the function; if not equal, setvbuf()
    was done from the write method and it is not our business to override
    the decision.

    PR:     76398
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D34007

 lib/libc/stdio/fflush.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-76398-227-Fl9tM1KE5E>