unix: don't abort() on EINVAL in threadpool.c
The FreeBSD implementation of pthread_join() returns EINVAL when a thread has already quit, not ESRCH.
This commit is contained in:
parent
b152b12772
commit
b9ed1a6dbf
@ -101,11 +101,8 @@ static void cleanup(void) {
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(threads); i++) {
|
||||
err = pthread_join(threads[i], NULL);
|
||||
|
||||
if (err == 0 || err == ESRCH)
|
||||
continue;
|
||||
|
||||
abort();
|
||||
assert(err == 0 || err == EINVAL || err == ESRCH);
|
||||
(void) err; /* Silence compiler warning in release builds. */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user