[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Built-in printf Sits Awkwardly with UDP.
From: |
Ralph Corderoy |
Subject: |
Re: Built-in printf Sits Awkwardly with UDP. |
Date: |
Fri, 22 Jul 2011 15:28:48 +0100 |
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.
- Re: Built-in printf Sits Awkwardly with UDP., (continued)
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/20
- Message not available
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/22
- Re: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/24
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/25
- Re: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/25
- Re: bug#9129: Built-in printf Sits Awkwardly with UDP., Jim Meyering, 2011/07/22
- Re: bug#9129: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/22
- Re: bug#9129: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/24
- Re: Built-in printf Sits Awkwardly with UDP., Andre Majorel, 2011/07/21
- Re: Built-in printf Sits Awkwardly with UDP., Ben Pfaff, 2011/07/21
- Message not available
- Re: Built-in printf Sits Awkwardly with UDP.,
Ralph Corderoy <=