Re: log.c use buffered IO

2023-10-19 Thread Theo Buehler
On Wed, Oct 18, 2023 at 11:34:09AM +0200, Claudio Jeker wrote: > On Tue, Oct 17, 2023 at 10:06:54AM +0200, Sebastian Benoit wrote: > > Theo Buehler(t...@theobuehler.org) on 2023.10.17 09:13:15 +0200: > > > On Mon, Oct 16, 2023 at 12:19:17PM +0200, Claudio Jeker wrote: > > > > I dislike how log.c

Re: log.c use buffered IO

2023-10-18 Thread Claudio Jeker
On Tue, Oct 17, 2023 at 10:06:54AM +0200, Sebastian Benoit wrote: > Theo Buehler(t...@theobuehler.org) on 2023.10.17 09:13:15 +0200: > > On Mon, Oct 16, 2023 at 12:19:17PM +0200, Claudio Jeker wrote: > > > I dislike how log.c does all these asprintf() calls with dubious > > > workaround calls in

Re: log.c use buffered IO

2023-10-17 Thread Sebastian Benoit
Theo Buehler(t...@theobuehler.org) on 2023.10.17 09:13:15 +0200: > On Mon, Oct 16, 2023 at 12:19:17PM +0200, Claudio Jeker wrote: > > I dislike how log.c does all these asprintf() calls with dubious > > workaround calls in case asprintf() fails. > > You're not alone. > > > IMO it is easier to

Re: log.c use buffered IO

2023-10-17 Thread Theo Buehler
On Mon, Oct 16, 2023 at 12:19:17PM +0200, Claudio Jeker wrote: > I dislike how log.c does all these asprintf() calls with dubious > workaround calls in case asprintf() fails. You're not alone. > IMO it is easier to use the stdio provided buffers and fflush() to get > "atomic" writes on stderr.

log.c use buffered IO

2023-10-16 Thread Claudio Jeker
I dislike how log.c does all these asprintf() calls with dubious workaround calls in case asprintf() fails. IMO it is easier to use the stdio provided buffers and fflush() to get "atomic" writes on stderr. At least from my understanding this is the reason to go all this lenght to do a single