From 59666802fba592a59f2f4ea4dcb053287fd55826 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 15 Feb 2011 02:20:21 -0500 Subject: make pthread_create return EAGAIN on resource failure, as required by POSIX --- src/thread/pthread_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/thread/pthread_create.c') 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; -- cgit v1.2.1