Hi André, > > When printf is finished the buffer is flushed, e.g. if there's > > anything in it then write(2) is called. > > If standard output is a log file, log entries could remain latent for > a very long time.
I don't see why. I'm not asking for buffering across multiple calls to the built-in printf but for non-line buffering *within* the processing of one printf. printf 'foo\nbar\n' # One write(2) preferred, not the current two. printf foo # One write(1), printf bar # the second write(1). The stdio buffer should always be flushed at the end of each printf command, to do otherwise would break too many things and be non-sensical. It also wouldn't match the behaviour of calling the /usr/bin printf. Cheers, Ralph. P.S. Please keep me CC'd.