From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4563 invoked by alias); 19 Apr 2006 20:05:24 -0000 Received: (qmail 4549 invoked by uid 48); 19 Apr 2006 20:05:22 -0000 Date: Wed, 19 Apr 2006 20:05:00 -0000 Message-ID: <20060419200522.4548.qmail@sourceware.org> From: "rsa at us dot ibm dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20051208133403.1995.michael.kerrisk@gmx.net> References: <20051208133403.1995.michael.kerrisk@gmx.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/1995] fprintf() + fmemopen() error (?) X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00174.txt.bz2 List-Id: ------- 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.