summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qlockfile_p.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-04-29 14:36:24 +0200
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-05-26 11:01:14 +0000
commit80c8d324b335753d5b1758f29775b844904bb2c6 (patch)
tree8865d7629eba535fbf9564d15f15025641375a8e /src/corelib/io/qlockfile_p.h
parenta0e5210d8b6b21d33800e1fac30efbf2868f9f5b (diff)
take process name into account for QLockFile's pid clash resolution
To cover the situation that the process ID got reused, the current process name is compared to the name of the process that corresponds to the process ID from the lock file. If the process names differ, the lock file is considered stale. [ChangeLog][QtCore][QLockFile] Detection of stale lock files got more robust and takes the name of the process that belongs to the stored PID into account. Task-number: QTBUG-45497 Change-Id: Ic3c0d7e066435451203e77b9b9ce2d70bfb9c570 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qlockfile_p.h b/src/corelib/io/qlockfile_p.h
index 0cfaa42849..168062f467 100644
--- a/src/corelib/io/qlockfile_p.h
+++ b/src/corelib/io/qlockfile_p.h
@@ -75,6 +75,7 @@ public:
// Returns \c true if the lock belongs to dead PID, or is old.
// The attempt to delete it will tell us if it was really stale or not, though.
bool isApparentlyStale() const;
+ static QString processNameByPid(qint64 pid);
#ifdef Q_OS_UNIX
static int checkFcntlWorksAfterFlock();