User: Password:
|
|
Subscribe / Log in / New account

POSIX v. reality: A position on O_PONIES

POSIX v. reality: A position on O_PONIES

Posted Sep 13, 2009 19:40 UTC (Sun) by njs (guest, #40338)
In reply to: POSIX v. reality: A position on O_PONIES by spitzak
Parent article: POSIX v. reality: A position on O_PONIES

IIUC, with your suggestion, running 'long_running_process > logfile' would make it impossible to track progress in the logfile, because the logfile would not become visible until after long_running_process exited. And if your box crashed, then the logfile would be impossible to read, period. (Think of checking /var/log/Xorg.0.log to debug X crashes...)


(Log in to post comments)

POSIX v. reality: A position on O_PONIES

Posted Sep 14, 2009 18:15 UTC (Mon) by spitzak (guest, #4593) [Link]

Most such software does ">>" or O_APPEND or otherwise opens the file with different flags, so it would act normally. Otherwise you are correct that something would have to be done, I believe any call to lseek() could indicate that you want the previous behavior, and it would be easy to alter software to do this, or add some syntax to the shell to do this.

Also it is possible that the file will revert to previous behavior after a certain size is achieved.

I still feel the benifits outweigh any compatibility problems. By far the majority of programs writing files with creat() act as though it works exactly like I describe.


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