Re: stale lockfile

1998-09-25 15:29:05
On September 25, 1998 at 19:01, Mats Dufberg wrote:

If using v2.3 (in beta), you can use -nolock if you are using a
pre-filter like Procmail.  I.e.  You can use Procmail's locking
capabilities to insure single process access to the archive.  I would
guess that Procmail's locking mechanism is more robust than MHonArc's.

Have you considered implementing fcntl() instead of using lock files? 

I believe fcntl() (or flock() or lockf()) will not work on all systems.
What about NFS, AFS, et al?  What about alternate OSs like Win32, MacOS,
VMS, OS/2, et al?

I have not looked into it in-depth, but I think the common Unix-way of
file locking is still not supported all possible ports (which was
definitely true in MHonArc's early days).  I would definitely welcome
code that can do file locking for all major ports of perl (and the
current method used by MHonArc does, I believe).  I try to keep MHonArc
as friendly as possible to alternate OSs and not require the latest
version of perl.  It is only recently that MHonArc requires Perl 5

I am thinking that using sysopen() with a lockfile may be an
alternative since sysopen() is basically open(2).  However, this is a
Unixism that I do not know if behavior is consistent on non-Unix


             Earl Hood              | University of California: Irvine
      ehood(_at_)medusa(_dot_)acs(_dot_)uci(_dot_)edu      |      Electronic 
Loiterer | Dabbler of SGML/WWW/Perl/MIME

<Prev in Thread] Current Thread [Next in Thread>