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

Re: report to ftpsync a patch to avoid the use the lockfile programm

2008/11/17 Joerg Jaspert <joerg@debian.org>:
>>> +       else
>>> +               touch "${LOCK}"
>>> +       fi
>> Better use ln, as it is atomic.
> If we are forced to use the shell find/touch method, we aren't atomic
> anymore anyway. And what should i link to? Also, its the less preferred
> method.

ln -s $LOCK $$

There's no need to use find either, ln either creates the link or it
fails (even if there's already one).

Just don't forget to use set -e, or catch the error (and probably
redirect stderr to /dev/null, as it won't contain anything useful).

> People should install procmail! :)

one less dependency by simply using ln ;)

> But hey, if you want - im always happy to get patches :)

The one liner pseudo patch is right above :)

> --
> bye, Joerg
> <liw> I'm a blabbermouth

Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net

Dan Quayle  - "This President is going to lead us out of this recovery."

Reply to: