[OpenWrt-Devel] [PATCH v2] busybox: lock: implement -n "Fail rather than wait"

Rafał Miłecki zajec5 at gmail.com
Fri Aug 7 19:40:25 EDT 2015


On 7 August 2015 at 17:40, Alexander Couzens <lynxis at fe80.eu> 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.
> fi
>> lock was free. But is locked now.
>> lock exists.
>
> v1: implement feature
> v2: rename variable failinsteadwait into try_lock
>     extend description of -n
>     run make package/utils/busybox/refresh

Having patch history in repository log isn't really helpful, so you
may put it in comments part of the patch.


> Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
> ---

Like here.

>  package/utils/busybox/patches/220-add_lock_util.patch | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list