LWN.net Logo

POSIX v. reality: A position on O_PONIES

POSIX v. reality: A position on O_PONIES

Posted Sep 14, 2009 18:20 UTC (Mon) by spitzak (guest, #4593)
In reply to: POSIX v. reality: A position on O_PONIES by cras
Parent article: POSIX v. reality: A position on O_PONIES

I don't think POSIX guarantees *anything* until close() is called, so anybody relying on seeing what is there is relying on non-POSIX behavior.

That said, I'm fairly certain that any lseek() on the file can be a trigger that this behavior is not wanted and that the partial file should become visible at that point. Of course no guarantee until close() is called...

This has no effect on pipes. So at absolute worst, you can write a logfile writer, so instead of "foo > logfile" you write "foo | write-old-style logfile".

I very much believe the improvements to atomicity from this so vastly outweigh any incompatibility problems that they are irrelevant.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds