This is the mail archive of the
mailing list for the glibc project.
[Bug stdio/20677] perror() changes orientation of stream when it is redirected
- From: "igor.liferenko at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 11 Oct 2016 08:56:04 +0000
- Subject: [Bug stdio/20677] perror() changes orientation of stream when it is redirected
- Auto-submitted: auto-generated
- References: <firstname.lastname@example.org/bugzilla/>
--- Comment #3 from Igor Liferenko <igor.liferenko at gmail dot com> ---
Created attachment 9556
Do not use fdopen on not-oriented streams. Just get the fd with fileno() and
then write directly to that fd.
Instead of leaving it completely broken, I suggest the attached patch to fix it
at least partially, until a better solution (without using "fileno") will be
FWIW, the bug was introduced in this commit:
Since this commit, perror.c was modified in these commits:
You are receiving this mail because:
You are on the CC list for the bug.