Why does pthread_create () sometimes give EAGAIN on a Cygwin port?

What does it mean when pthread_create () returns errno 11 (EAGAIN), "Resource is temporarily unavailable"?

I port my application to Cygwin while working on Centos 4. From time to time, the application crashes when pthread_create () is called, but most of the time it works fine.

What does this mean is going wrong?

The Linux Centos 4 man page says:

   EAGAIN The  system  lacked  the  necessary  resources  to  create  another  thread,  or  the  system-imposed  limit  on  the  total  number of threads in a process
          {PTHREAD_THREADS_MAX} would be exceeded.

I doubt that I am in PTHREAD_THREADS_MAX, since how can the Cygwin system run out of resources to create another thread?

+3
source share
1 answer

From the pthread_create () page :

pthread_create() , :
EAGAIN
, {PTHREAD_THREADS_MAX}.

, .

+1

All Articles