libs/stream_message/src/transport.cxx
// ===========================================================================
// This procedure will create a socket and set it to close on exec.
// -- code from paraset/src/serverspy/serverspy.cpp --
//
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 .
static int create_socket() {
    Exclusion s(creation_mutex);
    int sock = socket (PF_INET, SOCK_STREAM, 0);
#ifndef _WIN32
    if (sock >= 0) {
	fcntl(sock, F_SETFD, 1);
    }
#endif
    return sock;
}
static int create_socket ( ) { Exclusion s ( creation_mutex ) ; int sock = socket ( PF_INET , SOCK_STREAM , 0 ) ; #ifndef _WIN32 if ( sock >= 0 ) { fcntl ( sock , F_SETFD , 1 ) ; } #endif 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 .