If pthread_create fails with EINVAL…
Published by packi on
Updated by packi on

…you might want to check if you’re calling pthread_detach somewhere along the lifetime on that thread. If you don’t detach the thread the internal pthread structures will keep being allocated and leaked until you hit PTHREAD_THREADS_MAX threads.
At this point pthread_create will fail on each call.