Re: Module for better file locking. Name => "IO::Lock" ?

From: Ben Liddicott (ben_at_liddicott.com)
Date: 11/16/03


Date: Sun, 16 Nov 2003 21:02:38 +0000 (UTC)

IO::LockedFile just uses flock() locking.

My aim is to provide "better than flock" locking.

-- 
Cheers,
Ben Liddicott
"Bob Crankshaft" <NO_chtodd@SPAM.core.com> wrote in message news:1mapah5453ms0$.1nfvcgy9sk5r1$.dlg@40tude.net...
> In the spirit of not reproducing the hard work of others unless necessary,
> I submit the following question to you:  What is wrong with IO::LockFile
> (http://www.cpan.org/modules/by-module/IO/IO-LockedFile-0.23.readme)?  I
> use it daily with Log::LogLite with a high level of success, although I do
> not know how it compares under Win32 or over NFS/SMB.  My experience has
> been Solaris on local filesystems with many threads writing one log
> simultaneously.


Relevant Pages

  • Re: UW imap-2006b: 64 bit problem
    ... UW imapd is obliged> to do considerable more work on SVR4 systems than it does on BSD and> Linux systems which offer flock() locking as an alternative to POSIX> locking. ... IEEE Std 1003.1-1988 requires that all fcntl() locks associated with a file for a given process are removed when *any* file descriptor for that file is closed by that process. ... Put another way, before any library routine opens a file, it must be aware of what files the application and any other libraries have open and locked; otherwise the library routine will remove the lock unexpectedly when it closes the file. ...
    (comp.mail.imap)
  • Re: Whats up with our stdout?
    ... both fcntllocking and flockfail in my ... nfs-mounted without nolockd, and also without rpc.lockd or rpc.statd. ... nfs without the rpc daemons really doesn't support remote locking, ... flock() from failing and other times gave a hung flock. ...
    (freebsd-arch)
  • Re: question about forked processes writing to the same file
    ... Gunnar Hjalmarsson wrote: ... >> i think things are going well with the flock. ... still, i have the code written in such a way that i'm opening, locking, ...
    (comp.lang.perl.misc)
  • Re: Meet the flocker
    ... Always use the constants in Fcntl.pm for the flags to flock and seek. ... separate lockfile but then using flock on it is when the resource you're ... locking is not a regular file, so you can't flock it directly. ... sure to unlock by unlinking the lockfile, unlike a flock lock which the ...
    (comp.lang.perl.misc)