src/rdkafka_broker.c
int rd_kafka_socket_cb_generic (int domain, int type, int protocol,
                                void *opaque) {
        int s;
        int on = 1;
        s = (int)socket(domain, type, protocol);
        if (s == -1)
                return -1;
#ifdef FD_CLOEXEC
        fcntl(s, F_SETFD, FD_CLOEXEC, &on);
#endif
        return s;
}
/**
 * Fallback version of socket_cb NOT providing racefree CLOEXEC,
 * but setting CLOEXEC after socket creation (if FD_CLOEXEC is defined).
 */
Fallback version of socket_cb NOT providing racefree CLOEXEC,
but setting CLOEXEC after socket creation (if FD_CLOEXEC is defined).
Fallback version of socket_cb NOT providing racefree CLOEXEC but setting CLOEXEC after socket creation ( if FD_CLOEXEC is defined ) .
int rd_kafka_socket_cb_generic (int domain, int type, int protocol,
                                void *opaque) {
        int s;
        int on = 1;
        s = (int)socket(domain, type, protocol);
        if (s == -1)
                return -1;
#ifdef FD_CLOEXEC
        fcntl(s, F_SETFD, FD_CLOEXEC, &on);
#endif
        return s;
}
int rd_kafka_socket_cb_generic ( int domain , int type , int protocol , void * opaque ) { int s ; int on = 1 ; s = ( int ) socket ( domain , type , protocol ) ; if ( s == -1 ) return -1 ; #ifdef FD_CLOEXEC fcntl ( s , F_SETFD , FD_CLOEXEC , & on ) ; #endif return s ; }
Fallback version of socket_cb NOT providing racefree CLOEXEC,
 but setting CLOEXEC after socket creation (if FD_CLOEXEC is defined).
Fallback version of socket_cb NOT providing racefree CLOEXEC but setting CLOEXEC after socket creation ( if FD_CLOEXEC is defined ) .