summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
066b83b)
In case a pthread error prevented its creation.
if(result) {
PERROR("pthread_sigmask: %s", strerror(result));
}
if(result) {
PERROR("pthread_sigmask: %s", strerror(result));
}
+ else {
+ have_listener = 1;
+ }
}
static int init_socket(void)
}
static int init_socket(void)
-static void stop_listener()
+static void stop_listener(void)
+ if(!have_listener)
+ return;
+
result = pthread_cancel(listener_thread);
if(result != 0) {
ERR("pthread_cancel: %s", strerror(result));
result = pthread_cancel(listener_thread);
if(result != 0) {
ERR("pthread_cancel: %s", strerror(result));