qaengine/src/ClientInterface.cxx
//------------------------------------------------------------------------------
// This procedure will create a socket and set it to close on exec.
//------------------------------------------------------------------------------
This procedure will create a socket and set it to close on exec.
This procedure will create a socket and set it to close on exec .
int ClientInterface::createSocket() {
	if(m_Socket!=-1) {
		closesocket(m_Socket);
		m_Socket = -1;
	}
    int sock = socket (PF_INET, SOCK_STREAM, 0);
#ifndef _WIN32
    if (sock >= 0) {
	fcntl(sock, F_SETFD, 1);
    }
#endif
    m_Socket = sock;
    return sock;
}
int ClientInterface :: createSocket ( ) { if ( m_Socket != -1 ) { closesocket ( m_Socket ) ; m_Socket = -1 ; } int sock = socket ( PF_INET , SOCK_STREAM , 0 ) ; #ifndef _WIN32 if ( sock >= 0 ) { fcntl ( sock , F_SETFD , 1 ) ; } #endif m_Socket = sock ; return sock ; }
This procedure will create a socket and set it to close on exec.
This procedure will create a socket and set it to close on exec .