From cb51c2157f870a5c83ae6d9435ec4b1004392bc9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 13 Dec 2010 22:26:39 +0100 Subject: Don't need to set FD_CLOEXEC since qt_safe_* will have done that. Reviewed-By: Trust Me --- src/network/socket/qnativesocketengine_unix.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index f6bfbac..021acd0 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -202,9 +202,6 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc return false; } - // Ensure that the socket is closed on exec*(). - ::fcntl(socket, F_SETFD, FD_CLOEXEC); - socketDescriptor = socket; return true; } @@ -565,16 +562,6 @@ int QNativeSocketEnginePrivate::nativeAccept() #else int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0); #endif - //check if we have valid descriptor at all - if(acceptedDescriptor > 0) { - // Ensure that the socket is closed on exec*() - ::fcntl(acceptedDescriptor, F_SETFD, FD_CLOEXEC); - } -#ifdef Q_OS_SYMBIAN - else { - qWarning("QNativeSocketEnginePrivate::nativeAccept() - acceptedDescriptor <= 0"); - } -#endif return acceptedDescriptor; } -- cgit v0.12