This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14433] setvbuf _IOLBF doesn't honor size
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 06 Aug 2012 16:06:27 +0000
- Subject: [Bug libc/14433] setvbuf _IOLBF doesn't honor size
- Auto-submitted: auto-generated
- References: <bug-14433-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14433
--- Comment #3 from Rich Felker <bugdal at aerifal dot cx> 2012-08-06 16:06:27 UTC ---
Atomicity is only guaranteed when making a direct write() to a pipe. Nowhere is
stdio specified to have any atomicity properties with respect to pipes. With
that said, I think glibc and most if not all existing implementations will give
you the atomicity when the underlying fd is a pipe as long as the conditions
are met, but it would be foolish to rely on this.
Anyway, your proposed change to setvbuf contradicts the requirements of POSIX
and ISO C. Adding such a mode would require a new buffering mode constant so as
not to conflict with existing required semantics.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.