This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1995] fprintf() + fmemopen() error (?)
- From: "rsa at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 Apr 2006 20:05:22 -0000
- Subject: [Bug libc/1995] fprintf() + fmemopen() error (?)
- References: <20051208133403.1995.michael.kerrisk@gmx.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rsa at us dot ibm dot com 2006-04-19 20:05 -------
Hi Michael,
In my tests I also found that setting stream buffering to the size of buf works
just as well as no-buffering and is probably a better method because it reduces
turnaround, albeit slightly, i.e.
setbuffer(fp, buf, sizeof(buf));
I actually sent a patch to libc-alpha that got lost in the ether somewhere
(probably sitting in limbo on an ibm relay server again) that calls
_IO_setbuffer() on the _IO_FILE * stream pointer in fmemopen() after the
_IO_fopencookie() call in case it was deemed acceptable to change the buffering
implicitly. I'll resend for comment tomorrow if the patch doesn't show up.
I suggest mentioning setbuffer(fp, buf, sizeof(buf)) in the man page as the
recommended method for getting around the problem. I believe the libc info page
needs to be updated as well.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1995
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.