Date: Wed, 9 Jun 2004 17:40:40 +0200 From: Radim Kolar <hsn@netmag.cz> To: freebsd-arch@freebsd.org Subject: fflush() on readonly files Message-ID: <20040609154040.GA26229@asura.bsd>
next in thread | raw e-mail | index | archive | help
I have submitted pr http://www.freebsd.org/cgi/query-pr.cgi?pr=65402 with patch which makes fflush() on read only descriptors do not return error code. Reasons for this patch: 1 - Do not breaks ISO C standard 2 - Makes FreeBSD undefined behavior compatible with other operation systems 3 - Correct some programs depending on this 4 - Makes fflush() and fsync() behavior identical - avoids programmer's confusion. 5 - If there are no data to flush() then flush operation (dummy) succeeds, not failed. Against this patch: Programs which rely upon fflush() not returning an error when passed a file which is opened read-only are broken, and should be fixed. Colin Percival Are there any other reasons for non commiting it? I think that in this case pro > cons.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040609154040.GA26229>