Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: don't abort() on EINVAL in threadpool.c
Browse files Browse the repository at this point in the history
The FreeBSD implementation of pthread_join() returns EINVAL when a thread has
already quit, not ESRCH.
  • Loading branch information
bnoordhuis committed Oct 6, 2012
1 parent b152b12 commit b9ed1a6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/unix/threadpool.c
Expand Up @@ -101,11 +101,8 @@ static void cleanup(void) {


for (i = 0; i < ARRAY_SIZE(threads); i++) { for (i = 0; i < ARRAY_SIZE(threads); i++) {
err = pthread_join(threads[i], NULL); err = pthread_join(threads[i], NULL);

assert(err == 0 || err == EINVAL || err == ESRCH);
if (err == 0 || err == ESRCH) (void) err; /* Silence compiler warning in release builds. */
continue;

abort();
} }
} }


Expand Down

0 comments on commit b9ed1a6

Please sign in to comment.