DragonFly BSD
DragonFly commits List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/usr.bin Makefile src/usr.bin/shlock Makefile shlock.c

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Sat, 23 Jul 2005 22:12:59 +0200
Mail-followup-to: commits@crater.dragonflybsd.org

On Sat, Jul 23, 2005 at 12:58:25PM -0700, Matthew Dillon wrote:
> :joerg       2005/07/23 12:47:15 PDT
> :
> :DragonFly src repository
> :
> :  Modified files:
> :    usr.bin              Makefile 
> :  Added files:
> :    usr.bin/shlock       Makefile shlock.c 
> :  Log:
> :  Add shlock(1), a program for the safe creation of lock files from shell
> :  scripts. It's uses the same algorithm as implemented by Erik Fair, but
> :  is easier to read and more stricter in checking for error conditions.
>     We need the manual page for it.  Note also that we have a similar
>     program called 'lockf' which already provides script level locks.

lockf and shlock differ fundamentally. The former doesn't handle
abnormal termination very well or does allow being called from a shell
script to acquire the lock file. "shlock -f lockfile -p $$" is how it is
typically called and it removes stale lock files automatically.

About the man page, see my other mail :-)


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]