summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-02 19:42:04 (UTC)
committer zecke <zecke>2005-03-02 19:42:04 (UTC)
commita349b5d092c392aba28c6fbd99221559c33bc5e1 (patch) (side-by-side diff)
tree56a809f42d20c6f2fe7a60f243dd1aebca359b39
parent9f3e0913c7b01c1e14f907e756999b9d9bf9ceef (diff)
downloadopie-a349b5d092c392aba28c6fbd99221559c33bc5e1.zip
opie-a349b5d092c392aba28c6fbd99221559c33bc5e1.tar.gz
opie-a349b5d092c392aba28c6fbd99221559c33bc5e1.tar.bz2
Close the Filedescriptor for the QCopBridge and Transferserver on exit
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/qcopbridge.cpp2
-rw-r--r--core/launcher/transferserver.cpp3
2 files changed, 5 insertions, 0 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
@@ -64,4 +65,5 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
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>
@@ -57,4 +58,6 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
if ( !ok() )
owarn << "Failed to bind to port " << port << "" << oendl;
+ else
+ ::fcntl( socket(), F_SETFD, FD_CLOEXEC );
}