Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD bug/misbehavior in vdprintf



    Date:        Sat, 29 Aug 2020 08:25:42 -0700
    From:        Rob Newberry <robthedude%mac.com@localhost>
    Message-ID:  <470850F0-0D61-4B5D-B3D7-F24C46FD47FF%mac.com@localhost>

  | Is the interface any different for fprintf than dprintf?

fprintf (via the FILE) has a buffer - fprintf copies the (formatted)
data to the buffer, and then writes that.   The buffer remains after
the call returns (with or without having actually written anything).

dprintf has just a fd, all it can do is immediately write what it has
been given, if the write fails, for any reason, it fails - there's no
place to keep the data to try again later.

All that said, I see no reason why NetBSD's dprintf() should be different
than anyone else's, and Christos' recent change makes sense to me.

kre





Home | Main Index | Thread Index | Old Index