diff options
author | 2015-11-24 17:29:59 -0600 | |
---|---|---|
committer | 2015-12-11 17:59:52 +0000 | |
commit | b2c7c489ab40efb1f2f64aba5b90f5f4fb8d8536 (patch) | |
tree | 73a2f1eea66428c904c50dd99526e1a050581d0f /src/corelib/io/qlockfile_p.h | |
parent | Fix a crash when calling QOpenGLTexture::setData with a null QImage. (diff) | |
download | qtbase-b2c7c489ab40efb1f2f64aba5b90f5f4fb8d8536.tar.xz qtbase-b2c7c489ab40efb1f2f64aba5b90f5f4fb8d8536.zip |
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 <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/io/qlockfile_p.h')
-rw-r--r-- | src/corelib/io/qlockfile_p.h | 2 |
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); #endif QString fileName; |