]> git.ipfire.org Git - thirdparty/util-linux.git/commit
flock: user-configurable exit code
authorJan \"Yenya\" Kasprzak <kas@fi.muni.cz>
Tue, 5 Jun 2012 14:26:58 +0000 (16:26 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 15 Jun 2012 09:12:06 +0000 (11:12 +0200)
commit827b1ceefdfdb3b4b55affb32f3c315abb7ad3fb
tree4e9ecb6129ed6d6182d39c40a47a649386977e31
parente26de525e21677c680d87f63e4dafbe4859365bf
flock: user-configurable exit code

When locking the file fails with -n or -w option, caller has no way
to distinguish between the exit code 1 of the -c command,
and the exit code 1 of flock(1) caused by the conflicting lock.

Add a new -E <exitcode> (--conflict-exit-code) option to set
the exit code for the case of locking failure to any value.
sys-utils/flock.1
sys-utils/flock.c