summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-11 18:23:24 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-11 18:23:24 -0400
commit5bdcc10322c488f53557440acf71623d8b313ab5 (patch)
tree86ea9c63cf4e3c467c860c3860b479d8454c03f1 /nptl
parenteac80ce2fa2497c2b4ea1d55d690ad53e1375ece (diff)
downloadglibc-5bdcc10322c488f53557440acf71623d8b313ab5.tar.gz
glibc-5bdcc10322c488f53557440acf71623d8b313ab5.tar.xz
glibc-5bdcc10322c488f53557440acf71623d8b313ab5.zip
Translate kernel error into what pthread_create should return
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/allocatestack.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index f99dcfb22d..436952d137 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 ba251b9162..82408f5178 100644
--- a/nptl/allocatestack.c
+++ b/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);