Entry
Is there a way to safely achieve multiple simultaneous writes to a file from different instances of a script i.e. different users?
How can I lock a file?
Jun 9th, 2000 06:52
unknown unknown, Per M Knutsen, Simon Cozens
perldoc -q lock:
Found in /usr/local/lib/perl5/5.6.0/pod/perlfaq5.pod
How can I lock a file?
Perl's builtin flock() function (see the perlfunc manpage
for details) will call flock(2) if that exists, fcntl(2)
if it doesn't (on perl version 5.004 and later), and
lockf(3) if neither of the two previous system calls
exists...