thermferm/server.c

changeset 724
01e3936f62d4
parent 717
22dd7ab614e5
child 727
78744b7e6021
equal deleted inserted replaced
723:99e3e6971f97 724:01e3936f62d4
2636 2636
2637 void *my_server_loop(void *threadid) 2637 void *my_server_loop(void *threadid)
2638 { 2638 {
2639 socklen_t addrlen; 2639 socklen_t addrlen;
2640 int s, optval = 1; 2640 int s, optval = 1;
2641 pid_t pid = gettid();
2641 2642
2642 my_server_state = 1; 2643 my_server_state = 1;
2643 syslog(LOG_NOTICE, "Thread my_server_loop started"); 2644 syslog(LOG_NOTICE, "Thread my_server_loop started, pid=%d", pid);
2644 2645
2645 /* 2646 /*
2646 * Prepare thread to stop in blocking accept() call. 2647 * Prepare thread to stop in blocking accept() call.
2647 */ 2648 */
2648 pthread_cleanup_push(cleanup_handler, NULL); 2649 pthread_cleanup_push(cleanup_handler, NULL);

mercurial