summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qlockfile.cpp
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@digia.com>2014-10-23 09:50:57 +0200
committerRainer Keller <rainer.keller@digia.com>2014-10-27 08:47:55 +0100
commit1ffe1a9a7c5199e46bf280806456a5d86f314169 (patch)
treead21c02fe5045e42fad8ef00a27c2db9e75f2116 /src/corelib/io/qlockfile.cpp
parent81998b4e8e440076bd22a9164f0a93481c0e597a (diff)
Allow hostname from lock files to be empty
The common format for lock files is to only contain the PID. (See http://www.pathname.com/fhs/2.2/fhs-5.9.html) Qt includes some extra information but we can not expect this information to be present. Otherwise lock files created by other (non-Qt) processes are not handled correctly. Change-Id: Ib9be3c9f07eb8e87193f56d96f5559bbdd5180b8 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/io/qlockfile.cpp')
-rw-r--r--src/corelib/io/qlockfile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qlockfile.cpp b/src/corelib/io/qlockfile.cpp
index 18a782a8f3..c256507430 100644
--- a/src/corelib/io/qlockfile.cpp
+++ b/src/corelib/io/qlockfile.cpp
@@ -287,7 +287,7 @@ bool QLockFilePrivate::getLockInfo(qint64 *pid, QString *hostname, QString *appn
appNameLine.chop(1);
QByteArray hostNameLine = reader.readLine();
hostNameLine.chop(1);
- if (pidLine.isEmpty() || appNameLine.isEmpty())
+ if (pidLine.isEmpty())
return false;
qint64 thePid = pidLine.toLongLong();