]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Translate kernel error into what pthread_create should return
authorUlrich Drepper <drepper@gmail.com>
Wed, 11 May 2011 22:23:24 +0000 (23:23 +0100)
committerPetr Baudis <pasky@ucw.cz>
Thu, 26 May 2011 23:24:05 +0000 (01:24 +0200)
(cherry picked from commit 5bdcc10322c488f53557440acf71623d8b313ab5)

nptl/ChangeLog
nptl/allocatestack.c

index d7dc113832aa8b46fcdc3805c0f6e765fbf07811..ae6a1212623232dae107f5ceb0ebcec43519b042 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-11  Ulrich Drepper  <drepper@gmail.com>
+
+       [BZ #386]
+       * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
+
 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #12650]
index 550a8bec73e01c478636e87ea5b2b46655074d8b..81c833311a81673ba73164c06ad48e556c006378 100644 (file)
@@ -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);