Terminate threads when SIGINT is called - C
问题 I'm building a generic program written in C-UNIX (using Linux so I don't care about BSD or WIN functions), that creates two threads to handle the communication with a server. void init_threads(int socket_desc) { pthread_t chat_threads[2]; ret = pthread_create(&chat_threads[0], NULL, receiveMessage, (void*)(long)socket_desc); PTHREAD_ERROR_HELPER(ret, "Errore creazione thread ricezione messaggi"); ret = pthread_create(&chat_threads[1], NULL, sendMessage, (void*)(long)socket_desc); PTHREAD