+2004-09-18 Ulrich Drepper <drepper@redhat.com>
+
+ * allocatestack.c (allocate_stack): Return EAGAIN instead of
+ ENOMEM when out of memory.
+
2004-09-10 Roland McGrath <roland@redhat.com>
[BZ #379]
/* Allocate the DTV for this thread. */
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
- /* Something went wrong. */
- return errno;
+ {
+ /* Something went wrong. */
+ assert (errno == ENOMEM);
+ return EAGAIN;
+ }
/* Prepare to modify global data. */
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
{
/* Something went wrong. */
- int err = errno;
+ assert (errno == ENOMEM);
/* Free the stack memory we just allocated. */
(void) munmap (mem, size);
- return err;
+ return EAGAIN;
}