Re: Make run in parallel mode with output redirected to a regular file can randomly drop output lines

2013-05-31 Thread Frank Heckenbach
Eli Zaretskii wrote: > > From: Frank Heckenbach > > > > Eli Zaretskii wrote: > > > > > The problem exists, but there's nothing that can be done about it, as > > > long as we use write/fwrite/fprintf for this: the call to 'write' > > > isn't atomic on Windows even without O_APPEND, because of th

Re: Make run in parallel mode with output redirected to a regular file can randomly drop output lines

2013-05-31 Thread Eli Zaretskii
> Date: Fri, 31 May 2013 16:58:21 +0200 > Cc: psm...@gnu.org, stefano.lattar...@gmail.com, bug-make@gnu.org > From: Frank Heckenbach > > > > void write (int fd, void *data, size_t size) > > > { > > > if (getflags (fd) & O_APPEND) > > > { > > > lock_mutex (get_mutex (fd)); > > >

Re: Make run in parallel mode with output redirected to a regular file can randomly drop output lines

2013-05-31 Thread Frank Heckenbach
Eli Zaretskii wrote: > > From: Frank Heckenbach > > > > > > void write (int fd, void *data, size_t size) > > > > { > > > > if (getflags (fd) & O_APPEND) > > > > { > > > > lock_mutex (get_mutex (fd)); > > > > off_t pos = get_size (fd); > > > > do_write (fd, pos, data, size