* Alexander Couzens [07.08.2015 20:48]:
> lock -n is similiar to flock -n. If the lock was already taken,
> fail with exit code = 1 and write error message to stderr.
see: http://mywiki.wooledge.org/BashFAQ/045
internally we are using 'mkdir' which is called via a 'lock()' function:
if mkdir /tm
On 7 August 2015 at 17:40, 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 lock
On Fri, Aug 7, 2015 at 5:40 PM, 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
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.
v1: i