From ce51f55217a6dc7f1e611d10e0b09c6d39152a8f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 15 Sep 2012 19:14:21 +0200 Subject: pthread_create: turn ENOMEM to EAGAIN ENOMEM can be returned if some malloc fail, but it is not a valid POSIX error number for pthread_create; thus turn it to EAGAIN. * pthread/pt-create.c (pthread_create): Turn ENOMEM to EAGAIN. --- pthread/pt-create.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pthread') diff --git a/pthread/pt-create.c b/pthread/pt-create.c index 4d81a95..25a3607 100644 --- a/pthread/pt-create.c +++ b/pthread/pt-create.c @@ -66,6 +66,8 @@ pthread_create (pthread_t *thread, const pthread_attr_t *attr, err = __pthread_create_internal (&pthread, attr, start_routine, arg); if (! err) *thread = pthread->thread; + else if (err == ENOMEM) + err = EAGAIN; return err; } -- cgit v1.2.3