Re: fflush() on readonly files
From: David Schultz (das_at_FreeBSD.ORG)
Date: 06/10/04
- Previous message: Bruce M Simpson: "Re: dev_t / udev_t confusion ?"
- In reply to: Radim Kolar: "fflush() on readonly files"
- Next in thread: Tim Robbins: "Re: fflush() on readonly files"
- Reply: Tim Robbins: "Re: fflush() on readonly files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 9 Jun 2004 19:13:56 -0700 To: freebsd-arch@FreeBSD.ORG
On Wed, Jun 09, 2004, Radim Kolar wrote:
> 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
Are there any such programs?
> 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
I don't see how that's an argument against it. Programs that call
fflush() on a read-only stream are broken either way.
> Are there any other reasons for non commiting it? I think that in this case
> pro > cons.
Well, I think all those other operating systems (Solaris, HP-UX,
Linux, etc.) are wrong in this case, but it would probably behoove
us to conform to the /de facto/ standard.
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Bruce M Simpson: "Re: dev_t / udev_t confusion ?"
- In reply to: Radim Kolar: "fflush() on readonly files"
- Next in thread: Tim Robbins: "Re: fflush() on readonly files"
- Reply: Tim Robbins: "Re: fflush() on readonly files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|