From: Ulrich Drepper Date: Wed, 11 May 2011 22:23:24 +0000 (+0100) Subject: Translate kernel error into what pthread_create should return X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=564bc26b7954ca49de2b7f18a88aad03445de2d9;p=thirdparty%2Fglibc.git Translate kernel error into what pthread_create should return (cherry picked from commit 5bdcc10322c488f53557440acf71623d8b313ab5) --- diff --git a/nptl/ChangeLog b/nptl/ChangeLog index d7dc113832a..ae6a1212623 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2011-05-11 Ulrich Drepper + + [BZ #386] + * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN. + 2011-04-10 Ulrich Drepper [BZ #12650] diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 550a8bec73e..81c833311a8 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -628,7 +628,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, { int err; mprot_error: - err = errno; + err = errno == ENOMEM ? EAGAIN : errno; lll_lock (stack_cache_lock, LLL_PRIVATE);