summaryrefslogtreecommitdiff
path: root/libc/nptl/allocatestack.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/nptl/allocatestack.c')
-rw-r--r--libc/nptl/allocatestack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/nptl/allocatestack.c b/libc/nptl/allocatestack.c
index ba251b916..82408f517 100644
--- a/libc/nptl/allocatestack.c
+++ b/libc/nptl/allocatestack.c
@@ -637,7 +637,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);