in reply to Re: Question about flock and printing to file
in thread Question about flock and printing to file
IMHO flock just isn't worth using, it's almost entirely pointless.
flock is advisory, that's true. But to conclude that flock is useless is just wrong.
flock won't prevent a malicious (or clueless) other process from damaging a file. But as long as all processes agree on using flock to access the file, no damage will happen. Period. Unless, of course, the file is on NFS or other network filesystems (SMB, AFS, ...). At least some versions of NFS have locking problems, other network filesystems may have them, too.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Question about flock and printing to file
by AnomalousMonk (Archbishop) on Jun 23, 2015 at 17:19 UTC |