https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=994a4b7dccabb706c9dca2cd43c37e87f2cfe665
commit 994a4b7dccabb706c9dca2cd43c37e87f2cfe665 Author: Corinna Vinschen <[email protected]> Date: Wed Mar 8 17:43:23 2017 +0100 Cygwin: Emit correct errno EAGAIN if we can't create another thread Signed-off-by: Corinna Vinschen <[email protected]> Diff: --- winsup/cygwin/miscfuncs.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 6dbe462..2117eb9 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; } };
