From: Rich Felker Date: Tue, 15 Feb 2011 07:20:21 +0000 (-0500) Subject: make pthread_create return EAGAIN on resource failure, as required by POSIX X-Git-Tag: v0.6.0~43 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=59666802fba592a59f2f4ea4dcb053287fd55826;p=oweals%2Fmusl.git make pthread_create return EAGAIN on resource failure, as required by POSIX --- 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;