From e76c300f3ef76832ab5ffc3942738f1f87cc082c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Date: Thu, 19 Feb 2009 13:32:37 +0100 Subject: [PATCH] create less likely to clash fifo names on windows --- src/plugins/debugger/outputcollector.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/outputcollector.cpp b/src/plugins/debugger/outputcollector.cpp index d97f28ff0d9..9425939faea 100644 --- a/src/plugins/debugger/outputcollector.cpp +++ b/src/plugins/debugger/outputcollector.cpp @@ -39,6 +39,8 @@ #include <QtNetwork/QLocalSocket> #include <QtCore/QCoreApplication> +#include <stdlib.h> + #else #include <QtCore/QFile> @@ -80,7 +82,9 @@ bool OutputCollector::listen() return m_server->isListening(); m_server = new QLocalServer(this); connect(m_server, SIGNAL(newConnection()), SLOT(newConnectionAvailable())); - return m_server->listen(QString::fromLatin1("creator-%1").arg(QCoreApplication::applicationPid())); // XXX how to make that secure? + return m_server->listen(QString::fromLatin1("creator-%1-%2") + .arg(QCoreApplication::applicationPid()) + .arg(rand())); #else if (!m_serverPath.isEmpty()) return true; -- GitLab