in reply to Re: Locking a script
in thread Locking a script

That's not the traditional method, because the traditional methods work. {grin}

You can't separate the steps of "test for a lockfile" from "create a lockfile". It has to be an "atomic" operation. See the massive literature on this.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: Re: Locking a script
by AgentM (Curate) on Oct 19, 2000 at 08:53 UTC
    Sure, it's called open(). I was just commenting on what is actually happening. To a newbie you just cutting out some code, it's not essential to know that this is an atomic kernel call.
    AgentM Systems nor Nasca Enterprises nor Bone::Easy is responsible for the comments made by AgentM.</h6>
      Uh, I see the testing step at the top of the program, then the create-a-lockfile later. Maybe you knew that this wasn't the real logic of the program, but you sure didn't communicate that in a way that wasn't going to bite the newbies.

      -- Randal L. Schwartz, Perl hacker