in reply to OT (Perhaps) File Locking
Well it kinda depends. A "write" is atomic in Unix so if you're appending a chunk of data with only one underlying write (as in a singular print, printf, or write) you'll be okay (that is, that chunk of data will be appended as one piece of data to the file).
There are several reasons you may need locking:
Other than that, append to your hearts content without worrying about "losing" something (you won't).
-derby
update: Just one caveat, if the file you're appending to is on an nfs partition, you do want locking for appending. (Common sensical enough, the standard kernel can only control its own writes, not those of other processors).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OT (Perhaps) File Locking
by Abigail-II (Bishop) on Jun 03, 2002 at 17:31 UTC | |
by tye (Sage) on Jun 04, 2002 at 15:34 UTC | |
by Abigail-II (Bishop) on Jun 04, 2002 at 15:41 UTC | |
by Aristotle (Chancellor) on Jun 03, 2002 at 22:09 UTC |