wanted: analog to procmail's lockfile

View: New views
6 Messages — Rating Filter:   Alert me  

wanted: analog to procmail's lockfile

by Aleksey Cheusov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does anybody know more or less well known replacement for
"lockfile" utility shipped with procmail?

I'd prefer standalone utility that is distributed without so heavy baggage.

--
Best regards, Aleksey Cheusov.

Re: wanted: analog to procmail's lockfile

by Christos Zoulas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article <s93tzp2lqvf.fsf@...>,
Aleksey Cheusov  <netbsd-help@...> wrote:
>Does anybody know more or less well known replacement for
>"lockfile" utility shipped with procmail?
>
>I'd prefer standalone utility that is distributed without so heavy baggage.

shlock?

christos


Re: wanted: analog to procmail's lockfile

by Aleksey Cheusov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> In article <s93tzp2lqvf.fsf@...>,
> Aleksey Cheusov  <netbsd-help@...> wrote:
 >>Does anybody know more or less well known replacement for
 >>"lockfile" utility shipped with procmail?
 >>
 >>I'd prefer standalone utility that is distributed without so heavy baggage.

> shlock?

Unfortunately shlock cannot WAIT until lockfile is freed :-(

   while ! shlock ...; do
      sleep xxx;
   done

looks ugly

--
Best regards, Aleksey Cheusov.

Re: wanted: analog to procmail's lockfile

by Simon Truss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aleksey Cheusov wrote:

>> In article <s93tzp2lqvf.fsf@...>,
>> Aleksey Cheusov  <netbsd-help@...> wrote:
>  >>Does anybody know more or less well known replacement for
>  >>"lockfile" utility shipped with procmail?
>  >>
>  >>I'd prefer standalone utility that is distributed without so heavy baggage.
>
>> shlock?
>
> Unfortunately shlock cannot WAIT until lockfile is freed :-(
>
>    while ! shlock ...; do
>       sleep xxx;
>    done
>
> looks ugly
>

what about setlock in daemontools.

Simon


Re: wanted: analog to procmail's lockfile

by Aleksey Cheusov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 >>  >>Does anybody know more or less well known replacement for
 >>  >>"lockfile" utility shipped with procmail?
 >>  >>
 >>  >>I'd prefer standalone utility that is distributed without so
 >>  >>heavy baggage.
 >>
 >>> shlock?
 >>
 >> Unfortunately shlock cannot WAIT until lockfile is freed :-(
 >>
 >>    while ! shlock ...; do
 >>       sleep xxx;
 >>    done
 >>
 >> looks ugly
 >>

> what about setlock in daemontools.

WARNING: daemontools-0.76nb1 may not be put on a CD-ROM:
WARNING: modified source and binaries may not be distributed
WARNING: daemontools-0.76nb1 may not be made available through FTP:
WARNING: modified source and binaries may not be distributed

Also running child process doesn't look good.
shlock's way suits my needs better.

--
Best regards, Aleksey Cheusov.

Re: wanted: analog to procmail's lockfile

by Eric d'Alibut :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Feb 28, 2008 at 3:5 PM, Aleksey Cheusov <cheusov@...> wrote:

> > what about setlock in daemontools.

> WARNING: daemontools-0.76nb1 may not be put on a CD-ROM:
> WARNING: modified source and binaries may not be distributed
> WARNING: daemontools-0.76nb1 may not be made available through FTP:
> WARNING: modified source and binaries may not be distributed

daemontools is one of the packages djb recently put into public domain:

http://cr.yp.to/distributors.html

Best,

--
No no no, my fish's name is Eric, Eric the fish. He's an halibut. I am
not a looney! Why should I be tarred with the epithet looney merely
because I have a pet halibut?