summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-15 02:20:21 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-15 02:20:21 -0500
commit59666802fba592a59f2f4ea4dcb053287fd55826 (patch)
treed0e19e99d68afd81d2bf5669585f137c7436fca7 /src
parent1355fdca7cb923c93f9011d8e9dcf49e1a67e537 (diff)
downloadmusl-59666802fba592a59f2f4ea4dcb053287fd55826.tar.gz
musl-59666802fba592a59f2f4ea4dcb053287fd55826.tar.bz2
musl-59666802fba592a59f2f4ea4dcb053287fd55826.tar.xz
musl-59666802fba592a59f2f4ea4dcb053287fd55826.zip
make pthread_create return EAGAIN on resource failure, as required by POSIX
Diffstat (limited to 'src')
-rw-r--r--src/thread/pthread_create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 72d7acbc..d01be551 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -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;