From: Karel Zak Date: Thu, 2 Apr 2015 10:30:26 +0000 (+0200) Subject: libmount: add note about flock() to docs X-Git-Tag: v2.27-rc1~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=398f7f9d99648d9c0fbc901f921d05aba9301a9a;p=thirdparty%2Futil-linux.git libmount: add note about flock() to docs Signed-off-by: Karel Zak --- diff --git a/libmount/src/lock.c b/libmount/src/lock.c index 8fc971617f..0d943295aa 100644 --- a/libmount/src/lock.c +++ b/libmount/src/lock.c @@ -511,6 +511,10 @@ failed: * 3. a) link() success: setups F_SETLK lock (see fcnlt(2)) * b) link() failed: wait (max 30s) on F_SETLKW lock, goto 2. * + * Note that when the lock is used by mnt_update_table() interface then libmount + * uses flock() for private library file /run/mount/utab. The fcnlt(2) is used only + * for backwardly compatible stuff like /etc/mtab. + * * Returns: 0 on success or negative number in case of error (-ETIMEOUT is case * of stale lock file). */