mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
daemons: check for non-zero thread_id
Do not call pthread_join if thread_id would be 0.
This commit is contained in:
parent
e9b2148dab
commit
bbdcdc12b2
@ -560,7 +560,8 @@ static void _reap(daemon_state s, int waiting)
|
||||
|
||||
while (ts) {
|
||||
if (waiting || !ts->active) {
|
||||
if ((errno = pthread_join(ts->client.thread_id, &rv)))
|
||||
if (ts->client.thread_id &&
|
||||
(errno = pthread_join(ts->client.thread_id, &rv)))
|
||||
ERROR(&s, "pthread_join failed: %s", strerror(errno));
|
||||
last->next = ts->next;
|
||||
dm_free(ts);
|
||||
|
Loading…
x
Reference in New Issue
Block a user