From: Pierre-Marc Fournier Date: Tue, 23 Mar 2010 05:25:02 +0000 (-0400) Subject: fix pthread error handling X-Git-Tag: v0.5~45 X-Git-Url: https://git.lttng.org/?p=ust.git;a=commitdiff_plain;h=18cbdbac7dc495571984b347adf0af1810b2f007 fix pthread error handling --- diff --git a/libust/tracectl.c b/libust/tracectl.c index 6c83929..1dee616 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -1303,12 +1303,12 @@ static void stop_listener() int result; result = pthread_cancel(listener_thread); - if(result == -1) { - PERROR("pthread_cancel"); + if(result != 0) { + ERR("pthread_cancel: %s", strerror(result)); } result = pthread_join(listener_thread, NULL); - if(result == -1) { - PERROR("pthread_join"); + if(result != 0) { + ERR("pthread_join: %s", strerror(result)); } }