path: root/src/corelib/io/qlockfile_p.h
diff options
authorDavid Fries <>2015-11-24 17:29:59 -0600
committerDavid Fries <>2015-12-11 17:59:52 +0000
commitb2c7c489ab40efb1f2f64aba5b90f5f4fb8d8536 (patch)
tree73a2f1eea66428c904c50dd99526e1a050581d0f /src/corelib/io/qlockfile_p.h
parent672f7dfdcd00d124cd0f973e04e3e2d6445d5483 (diff)
QLockFile: decide on locking strategy per path
It is filesystem dependent if flock and fcntl locks are independent or the same underlying lock (which causes getting the second lock to fail). A temporary file in /tmp might be on a local file system and pass while the lock file is placed on NFS and fail with: setNativeLocks failed: Resource temporarily unavailable Instead check for lock conflicts per path and cache the result. Change-Id: I39c59bb240cd99ef0a0ec271243770ffd5df8a7d Reviewed-by: David Faure <>
Diffstat (limited to 'src/corelib/io/qlockfile_p.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qlockfile_p.h b/src/corelib/io/qlockfile_p.h
index 168062f467..48b642abd0 100644
--- a/src/corelib/io/qlockfile_p.h
+++ b/src/corelib/io/qlockfile_p.h
@@ -78,7 +78,7 @@ public:
static QString processNameByPid(qint64 pid);
#ifdef Q_OS_UNIX
- static int checkFcntlWorksAfterFlock();
+ static int checkFcntlWorksAfterFlock(const QString &fn);
QString fileName;