]> err.no Git - util-linux/commit
flock: Allow lock directory
authorAlexey Gladkov <legion@altlinux.org>
Mon, 24 Nov 2008 15:15:36 +0000 (18:15 +0300)
committerKarel Zak <kzak@redhat.com>
Wed, 3 Dec 2008 09:33:53 +0000 (10:33 +0100)
commitff5717391c3cebb4799c8e5d6dd9876fc5005fd0
tree85a4f5c1c2cc88def62403810de87fa2643ae673
parent8da18ddb8167ddbf4c3eeddfcb699f5a81e33c2f
flock: Allow lock directory

With this patch, you can lock directory. Additionally,
lockfile opens with O_NOCTTY.

Try to open file with O_CREAT flag first, and without it
if open fails with EISDIR.  Suggested by H. Peter Anvin.

Signed-off-by: Alexey Gladkov <legion@altlinux.org>
sys-utils/flock.1
sys-utils/flock.c