From 994a4b7dccabb706c9dca2cd43c37e87f2cfe665 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 8 Mar 2017 17:43:23 +0100 Subject: [PATCH] Cygwin: Emit correct errno EAGAIN if we can't create another thread Signed-off-by: Corinna Vinschen --- winsup/cygwin/miscfuncs.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 6dbe462b2..2117eb978 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -549,6 +549,8 @@ public: /* If we got an address, remember it for the next allocation attempt. */ if (real_stackaddr) current = (UINT_PTR) real_stackaddr; + else + set_errno (EAGAIN); return real_stackaddr; } };