author | zecke <zecke> | 2005-03-02 19:42:04 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-03-02 19:42:04 (UTC) |
commit | a349b5d092c392aba28c6fbd99221559c33bc5e1 (patch) (unidiff) | |
tree | 56a809f42d20c6f2fe7a60f243dd1aebca359b39 | |
parent | 9f3e0913c7b01c1e14f907e756999b9d9bf9ceef (diff) | |
download | opie-a349b5d092c392aba28c6fbd99221559c33bc5e1.zip opie-a349b5d092c392aba28c6fbd99221559c33bc5e1.tar.gz opie-a349b5d092c392aba28c6fbd99221559c33bc5e1.tar.bz2 |
Close the Filedescriptor for the QCopBridge and Transferserver on exit
-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; | |||
46 | #include <pwd.h> | 46 | #include <pwd.h> |
47 | #include <unistd.h> | 47 | #include <unistd.h> |
48 | #include <fcntl.h> | ||
48 | #include <sys/types.h> | 49 | #include <sys/types.h> |
49 | #endif | 50 | #endif |
@@ -62,6 +63,7 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, | |||
62 | { | 63 | { |
63 | if ( !ok() ) | 64 | if ( !ok() ) |
64 | owarn << "Failed to bind to port " << port << "" << oendl; | 65 | owarn << "Failed to bind to port " << port << "" << oendl; |
65 | else { | 66 | else { |
67 | ::fcntl( socket(), F_SETFD, FD_CLOEXEC ); | ||
66 | #ifndef QT_NO_COP | 68 | #ifndef QT_NO_COP |
67 | desktopChannel = new QCopChannel( "QPE/Desktop", this ); | 69 | 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; | |||
40 | #include <sys/types.h> | 40 | #include <sys/types.h> |
41 | #include <unistd.h> | 41 | #include <unistd.h> |
42 | #include <fcntl.h> | ||
42 | #include <stdlib.h> | 43 | #include <stdlib.h> |
43 | #include <time.h> | 44 | #include <time.h> |
@@ -56,5 +57,7 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent, | |||
56 | connections.setAutoDelete( TRUE ); | 57 | connections.setAutoDelete( TRUE ); |
57 | if ( !ok() ) | 58 | if ( !ok() ) |
58 | owarn << "Failed to bind to port " << port << "" << oendl; | 59 | owarn << "Failed to bind to port " << port << "" << oendl; |
60 | else | ||
61 | ::fcntl( socket(), F_SETFD, FD_CLOEXEC ); | ||
59 | } | 62 | } |
60 | 63 | ||