> From: Paul Smith <psm...@gnu.org> > Cc: Frank Heckenbach <f.heckenb...@fh-soft.de>, stefano.lattar...@gmail.com, > bug-make@gnu.org > Date: Mon, 27 May 2013 14:09:42 -0400 > > The original issue reported is that if you do something like this: > > make -j >make.out > > and your make environment is recursive so you invoke one or more > sub-makes, your output may not just be interspersed (that is output > between multiple jobs are mixed together) but you will actually lose > some output: it will never appear at all. > > The reason is that when you have multiple processes trying to update the > same file at the same time using standard output file mode, there is a > race condition between when the output is written to the file and when > the "current offset" value is updated, where multiple processes could be > overwriting the same part of the file.
It sounds strange to me that the filesystem doesn't serialize the writes. Maybe I'm naive. > POSIX guarantees that if you open a file in O_APPEND mode, the above > race can never happen because the kernel updates the file offset as the > file is being written. > > Frank's question is whether other, non-POSIX systems have the same > behavior with O_APPEND. I will have to try that to know for sure. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make