From a349b5d092c392aba28c6fbd99221559c33bc5e1 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 02 Mar 2005 19:42:04 +0000 Subject: Close the Filedescriptor for the QCopBridge and Transferserver on exit --- (limited to 'core/launcher') diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp index e339dc7..64eb096 100644 --- a/core/launcher/qcopbridge.cpp +++ b/core/launcher/qcopbridge.cpp @@ -45,6 +45,7 @@ using namespace Opie::Core; #ifndef Q_OS_WIN32 #include #include +#include #include #endif @@ -61,8 +62,9 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, cardChannel( 0 ) { if ( !ok() ) - owarn << "Failed to bind to port " << port << "" << oendl; + owarn << "Failed to bind to port " << port << "" << oendl; else { + ::fcntl( socket(), F_SETFD, FD_CLOEXEC ); #ifndef QT_NO_COP desktopChannel = new QCopChannel( "QPE/Desktop", this ); connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)), diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 2b2e435..a219c0f 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -39,6 +39,7 @@ using namespace Opie::Core; #include #include #include +#include #include #include @@ -55,7 +56,9 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent, { connections.setAutoDelete( TRUE ); if ( !ok() ) - owarn << "Failed to bind to port " << port << "" << oendl; + owarn << "Failed to bind to port " << port << "" << oendl; + else + ::fcntl( socket(), F_SETFD, FD_CLOEXEC ); } void TransferServer::authorizeConnections() -- cgit v0.9.0.2