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:
Ben Noordhuis 2012-10-06 22:45:26 +02:00
parent b152b12772
commit b9ed1a6dbf

View File

@ -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. */
}
}