X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=5e738b06cf6eee5b539f4f507ba97817525a8fbf;hb=e37047b693079a1136cc467f6ea9b8090ce58d10;hp=12385dfca95762d32839b4e5917a92f8b82b4c58;hpb=dc43c97f077c92fd1d90c898496120c08ca571a7;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 12385dfc..5e738b06 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -883,15 +883,20 @@ void __attribute__((constructor)) lttng_ust_init(void) sigfillset(&sig_all_blocked); ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_parent_mask); if (ret) { - PERROR("pthread_sigmask: %s", strerror(ret)); + ERR("pthread_sigmask: %s", strerror(ret)); } ret = pthread_create(&global_apps.ust_listener, NULL, ust_listener_thread, &global_apps); - + if (ret) { + ERR("pthread_create global: %s", strerror(ret)); + } if (local_apps.allowed) { ret = pthread_create(&local_apps.ust_listener, NULL, ust_listener_thread, &local_apps); + if (ret) { + ERR("pthread_create local: %s", strerror(ret)); + } } else { handle_register_done(&local_apps); } @@ -899,7 +904,7 @@ void __attribute__((constructor)) lttng_ust_init(void) /* Restore original signal mask in parent */ ret = pthread_sigmask(SIG_SETMASK, &orig_parent_mask, NULL); if (ret) { - PERROR("pthread_sigmask: %s", strerror(ret)); + ERR("pthread_sigmask: %s", strerror(ret)); } switch (timeout_mode) { @@ -975,12 +980,14 @@ void __attribute__((destructor)) lttng_ust_exit(void) /* cancel threads */ ret = pthread_cancel(global_apps.ust_listener); if (ret) { - ERR("Error cancelling global ust listener thread"); + ERR("Error cancelling global ust listener thread: %s", + strerror(ret)); } if (local_apps.allowed) { ret = pthread_cancel(local_apps.ust_listener); if (ret) { - ERR("Error cancelling local ust listener thread"); + ERR("Error cancelling local ust listener thread: %s", + strerror(ret)); } } /*