* Alexander Couzens [06.08.2015 19:05]:
> lock -n is similiar to flock -n. If the lock was already taken,
> fail with exit code = 1 and write error message to stderr.
sorry, forget to ask:
is this "more" atomic than 'mkdir mypath || return'?
bye, bastian
_
On 2015-08-06 17:28, Alexander Couzens wrote:
> lock -n is similiar to flock -n. If the lock was already taken,
> fail with exit code = 1 and write error message to stderr.
>
> example:
> if ! lock -n /tmp/foo ; then
> echo lock exits.
> else
> echo lock was free. But is locked now.
>
lock -n is similiar to flock -n. If the lock was already taken,
fail with exit code = 1 and write error message to stderr.
example:
if ! lock -n /tmp/foo ; then
echo lock exits.
else
echo lock was free. But is locked now.
fi
> lock was free. But is locked now.
> lock exists.
Signe