mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-01 09:47:48 +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
cc865749ae
commit
1cc1333599
@ -551,7 +551,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;
|
||||
free(ts);
|
||||
|
Loading…
x
Reference in New Issue
Block a user