mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dmeventd: add check for result code
Check result from pthread_kill.
This commit is contained in:
parent
02621cffb0
commit
f41935909f
@ -754,6 +754,7 @@ static void *_timeout_thread(void *unused __attribute__((unused)))
|
|||||||
struct thread_status *thread;
|
struct thread_status *thread;
|
||||||
struct timespec timeout;
|
struct timespec timeout;
|
||||||
time_t curr_time;
|
time_t curr_time;
|
||||||
|
int ret;
|
||||||
|
|
||||||
DEBUGLOG("Timeout thread starting.");
|
DEBUGLOG("Timeout thread starting.");
|
||||||
pthread_cleanup_push(_exit_timeout, NULL);
|
pthread_cleanup_push(_exit_timeout, NULL);
|
||||||
@ -775,7 +776,10 @@ static void *_timeout_thread(void *unused __attribute__((unused)))
|
|||||||
} else {
|
} else {
|
||||||
DEBUGLOG("Sending SIGALRM to Thr %x for timeout.",
|
DEBUGLOG("Sending SIGALRM to Thr %x for timeout.",
|
||||||
(int) thread->thread);
|
(int) thread->thread);
|
||||||
pthread_kill(thread->thread, SIGALRM);
|
ret = pthread_kill(thread->thread, SIGALRM);
|
||||||
|
if (ret && (ret != ESRCH))
|
||||||
|
log_error("Unable to wakeup Thr %x for timeout: %s.",
|
||||||
|
(int) thread->thread, strerror(ret));
|
||||||
}
|
}
|
||||||
_unlock_mutex();
|
_unlock_mutex();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user