diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-11 23:23:24 +0100 |
---|---|---|
committer | Petr Baudis <pasky@ucw.cz> | 2011-05-27 01:24:05 +0200 |
commit | 564bc26b7954ca49de2b7f18a88aad03445de2d9 (patch) | |
tree | 517b72c05a687f6c70f8a498210580b54d1771e5 | |
parent | d95270c5b52632ec3bc438c852516bda6b1f87d1 (diff) | |
download | glibc-564bc26b7954ca49de2b7f18a88aad03445de2d9.zip glibc-564bc26b7954ca49de2b7f18a88aad03445de2d9.tar.gz glibc-564bc26b7954ca49de2b7f18a88aad03445de2d9.tar.bz2 |
Translate kernel error into what pthread_create should return
(cherry picked from commit 5bdcc10322c488f53557440acf71623d8b313ab5)
-rw-r--r-- | nptl/ChangeLog | 5 | ||||
-rw-r--r-- | nptl/allocatestack.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index d7dc113..ae6a121 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -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] diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 550a8be..81c8333 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); |