forked from qt-creator/qt-creator
CMake: Use shorter names for local sockets in server-mode
Apparently there is a limit to about 100 characters or so on some versions of Unix (e.g. Darwin), and there is also the tendency to point TMPDIR into places very far from '/' (e.g. Darwin), which can result in the local socket path getting trunkated. So make sure to put the local socket into /tmp on Unix. That works on Linux and on Darwin. Change-Id: I40bfaf932c5013cf72addb5621360e97c9583daa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QTimer>
|
||||
#include <QVariantMap>
|
||||
#include <QTemporaryDir>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -84,6 +85,9 @@ private:
|
||||
|
||||
void reportError(const QString &msg);
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
QTemporaryDir m_socketDir;
|
||||
#endif
|
||||
std::unique_ptr<Utils::QtcProcess> m_cmakeProcess;
|
||||
QLocalSocket *m_cmakeSocket = nullptr;
|
||||
QTimer m_connectionTimer;
|
||||
@@ -112,6 +116,7 @@ private:
|
||||
const int m_minorProtocol = -1;
|
||||
|
||||
int m_requestCounter = 0;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user