mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
backport fix for #77412
svn path=/branches/KDE_3_2_BRANCH/kdenetwork/krfb/; revision=300241
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
#include <klocale.h>
|
||||
#include <kglobal.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
PortListener::PortListener(KService::Ptr s,
|
||||
KConfig *config,
|
||||
KServiceRegistry *srvreg) :
|
||||
@@ -188,6 +191,9 @@ void PortListener::accepted(KSocket *sock) {
|
||||
return;
|
||||
}
|
||||
|
||||
// disable CLOEXEC flag, fixes #77412
|
||||
fcntl(sock->socket(), F_SETFD, fcntl(sock->socket(), F_GETFD) & ~FD_CLOEXEC);
|
||||
|
||||
m_process.clearArguments();
|
||||
m_process << m_execPath << m_argument << QString::number(sock->socket());
|
||||
if (!m_process.start(KProcess::DontCare)) {
|
||||
|
||||
Reference in New Issue
Block a user