summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/installer/remoteserver.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libs/installer/remoteserver.cpp b/src/libs/installer/remoteserver.cpp
index eeab37c6e..185466ccd 100644
--- a/src/libs/installer/remoteserver.cpp
+++ b/src/libs/installer/remoteserver.cpp
@@ -71,6 +71,14 @@ void RemoteServer::start()
if (d->m_tcpServer)
return;
+#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
+ // avoid writing to stderr:
+ // the parent process has redirected stderr to a pipe to work with sudo,
+ // but is not reading anymore -> writing to stderr will block after a while.
+ if (d->m_mode == Protocol::Mode::Production)
+ fclose(stderr);
+#endif
+
d->m_tcpServer = new TcpServer(d->m_port, d->m_key);
d->m_tcpServer->moveToThread(&d->m_thread);
connect(&d->m_thread, SIGNAL(finished()), d->m_tcpServer, SLOT(deleteLater()));