-rw-r--r-- | core/launcher/qcopbridge.cpp | 4 | ||||
-rw-r--r-- | core/launcher/transferserver.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
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 @@ -46,4 +46,5 @@ using namespace Opie::Core; #include <pwd.h> #include <unistd.h> +#include <fcntl.h> #include <sys/types.h> #endif @@ -62,6 +63,7 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, { 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 ); 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 @@ -40,4 +40,5 @@ using namespace Opie::Core; #include <sys/types.h> #include <unistd.h> +#include <fcntl.h> #include <stdlib.h> #include <time.h> @@ -56,5 +57,7 @@ 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 ); } |