fflush() on readonly files

From: Radim Kolar (hsn_at_netmag.cz)
Date: 06/09/04

  • Next message: Maxime Henrion: "Re: dev_t / udev_t confusion ?"
    Date: Wed, 9 Jun 2004 17:40:40 +0200
    To: freebsd-arch@freebsd.org
    
    

    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.
    _______________________________________________
    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"


  • Next message: Maxime Henrion: "Re: dev_t / udev_t confusion ?"

    Relevant Pages

    • Re: fflush() on readonly files
      ... > which makes fflush() on read only descriptors do not return error code. ... > Reasons for this patch: ...
      (freebsd-arch)
    • Another experimental patch: quickhell
      ... An ALPHA-level patch without documentation or standards adherence. ... for reasons that will become clear. ... Qrzbtbetna vf abj n thnenagrrq zbafgre, ...
      (rec.games.roguelike.nethack)
    • Re: [PATCH] Add CONFIG_VFAT_NO_CREATE_WITH_LONGNAMES option
      ... > a patch on the grounds of nothing but vague references to possibly ... fully understand the reasons for it. ... The reality is that without a clear understanding of what the bug is ... linux kernel code but rather it sounds like a denial of service attack ...
      (Linux-Kernel)
    • Re: Pending MFC of drm updates
      ... Robert Noland wrote: ... I have a patch available for testing at ... With the updated patchfile you need to: ... *** Error code 1 ...
      (freebsd-stable)
    • Re: How to complie keepliaved from Port.
      ... Is there anyone knows how to compile keepalived from the port? ... Its patch only available up to version 7.0. ... When I followed its instruction to patch 4 files, 1 or 2 of those have ... *** Error code 1 ...
      (freebsd-net)