make pthread_create return EAGAIN on resource failure, as required by POSIX

This commit is contained in:
Rich Felker 2011-02-15 02:20:21 -05:00
parent 1355fdca7c
commit 59666802fb
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo
if (ret < 0) {
a_dec(&libc.threads_minus_1);
munmap(map, size);
return -ret;
return EAGAIN;
}
*res = new;
return 0;