Paul Smith wrote: > Nevertheless, I do wonder whether forcing stdout/stderr into O_APPEND > mode would be worthwhile. It would fix this problem in any event. I'm > having a hard time coming up with a reason NOT to do it.
One issue, though it might seem strange that I'm the one to mention it, is that it might be POSIX specific. How do other systems behave, can they set O_APPEND via fcntl or otherwise, and if so, does it guarantee non-conflicting writes? Of course, you could say an improvement that only works on some systems (as long as doesn't negatively affect other systems) is better than nothing, but it might give package maintainers a false sense of safety in keeping a problematic way of doing things rather than modifying their packages to do it safely right away (like Stefano just did as I understand it). Though, if O_APPEND doesn't guarantee non-conflicting writes *at all* (i.e., even when set on opening, as in "make >> logfile") on some systems, it's not really safe either. Of course, you can construct a theoretical case, such as someone setting up a large empty file, seeking to its beginning and expecting their make jobs to write there. I can't think of any practical reason to do this, but as with most of the "-O" and related discussions, I'm sure someone will tell us about such a scenario soon. :-) Neither of may be a very strong argument, but my gut feeling is that this is slightly outside of the scope of what make should do. But in any case, I don't have a strong opinion since I'll be using output-sync from now on anyway. Stefano Lattarini wrote: > An now that I think about it, maybe the sanest "fix" would be just > documenting the issue in the manual? I tend to agree. Perhaps a sentence or two in "Parallel Output", mentioning that output-sync will also avoid this problem. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make