struct sockaddr_storage client_sa;
socklen_t client_sa_size;
pthread_t tid;
+ pthread_attr_t attr;
if (pollfds[i].revents == 0)
continue;
continue;
}
- status = pthread_create (&tid, /* attr = */ NULL, connection_thread_main,
+ pthread_attr_init (&attr);
+ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+
+ status = pthread_create (&tid, &attr, connection_thread_main,
/* args = */ (void *) client_sd);
if (status != 0)
{