Swap
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines
This is 'nice' for the server, it doesn't have the overhead of maintaining a file-system state. That's why servers are supposed to be read-only. However, somebody has got to write the stuff to the file-system that's going to (eventually) be read-only. Beware when such access occurs.
But NFS still allows atomic rename() right? Isn't it considered essential to write the new executable or library under a different name, and then atomically rename() over the old one? If you write() directly into the executable, you will get what you deserve...
Regards,
Dan
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Dan Maas <[email protected]> writes:
> But NFS still allows atomic rename() right? Isn't it considered > essential to write the new executable or library under a > different name, and then atomically rename() over the old one? > If you write() directly into the executable, you will get what > you deserve...
Atomic rename works fine, on NFS, so if you just rename the old library, you're quite safe. The bugs start to surface if you:
a) Reuse the the old library's inode by doing something along the lines of open("lib.so",O_TRUNC|O_WRONLY).
or
b) erase the old library.
Cheers,
Trond