Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If the processes are running on the same host, why not lock the DATA filehandle?
    flock(DATA, LOCK_EX|LOCK_NB) or die "Already running.";
    should do it. No need for messy temp files to remember to cleanup.
    • Heh, locking the DATA filehandle is a neat idea.

      But more to the point, who would consider using flock() over NFS? That's scary bad stuff. You're now relying on correct implementation of lockd everywhere, which is not guaranteed. Better to use some form of lockfile, the way that the MTAs & procmail do...