Re: [dev] lock (1) - a dead simple lock script

From: Calvin Morrison <>
Date: Tue, 8 Apr 2014 12:25:55 -0400

On 8 April 2014 12:19, Amadeus Folego <> wrote:
> Hi Calvin,
> Thanks for sharing it, it's really neat!
> I have the same problem with some cron jobs, but I use lockrun[1].
> It's source code is quite simple[2] too.

That code is simple enough, but it did leave a poor taste in my mouth.
A clean rewrite would be easy.

> The reason why I would still stick with lockrun is that
> in the context of cron jobs, it is better that the task does not
> runs than piling up.
> What do you think about it?
> [1]:
> [2]:

Yes, I've used lockrun quite a bit, but since it wasn't available on
all platforms I am targeting, and flock also wasn't (I would prefer
flock mostly over the others), I wanted to have something that I can
use elsewhere.

As to the piling, versus just exiting, my application needs to execute
both eventually, so I had it do that. It would probably be trivial to
do both.

This brings up another thought. Most utilities in the standard
distribution of binaries, and even more in moreutils often are hard
coded C, where a few liner shell script would work. Any thoughts on
one versus the other?

Received on Tue Apr 08 2014 - 18:25:55 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 08 2014 - 18:36:07 CEST