Q: applet flock fails with 'invalid number $filename'

Bastian Bittorf bittorf at bluebottle.com
Thu Jan 7 06:43:32 UTC 2016


I'am trying to use flock on OpenWrt with musl and
busybox-git/HEAD. What happens here is this:

root at OpenWrt:/ flock test
flock: invalid number 'test'
root at OpenWrt:/ flock /tmp
flock: invalid number '/tmp'
root at OpenWrt:/ flock /tmp/test
flock: invalid number '/tmp/test'

root at OpenWrt:/ flock -x test
flock: invalid number 'test'
root at OpenWrt:/ flock -x /tmp
flock: invalid number '/tmp'
root at OpenWrt:/ flock -x /tmp/test
flock: invalid number '/tmp/test'

root at OpenWrt:/ flock
BusyBox v1.25.0.git (2016-01-06 23:08:01 CET) multi-call binary.

Usage: flock [-sxun] FD|{FILE [-c] PROG ARGS}

[Un]lock file descriptor, or lock FILE, run PROG

        -s      Shared lock
        -x      Exclusive lock (default)
        -u      Unlock FD
        -n      Fail rather than wait

so what is the expected usage?
or is this maybe a musl effect?

bye, bastian


More information about the busybox mailing list