projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add paranoid check before listener thread destruction
[ust.git]
/
libust
/
tracectl.c
diff --git
a/libust/tracectl.c
b/libust/tracectl.c
index 2f9215e65b29adc0df6095ce72c206425304c559..03220373c92dee9c7eea7ee259d231de8924b809 100644
(file)
--- a/
libust/tracectl.c
+++ b/
libust/tracectl.c
@@
-1070,8
+1070,9
@@
void create_listener(void)
if(result) {
PERROR("pthread_sigmask: %s", strerror(result));
}
if(result) {
PERROR("pthread_sigmask: %s", strerror(result));
}
-
- have_listener = 1;
+ else {
+ have_listener = 1;
+ }
}
static int init_socket(void)
}
static int init_socket(void)
@@
-1369,10
+1370,13
@@
int restarting_usleep(useconds_t usecs)
return result;
}
return result;
}
-static void stop_listener()
+static void stop_listener(
void
)
{
int result;
{
int result;
+ 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));
This page took
0.0228 seconds
and
4
git commands to generate.