Error Handling
Pthreads routines always return either zero or an error as their return values.
Pthreads routines do not set errno (because errno is defined as an extern int).
However, pthreads defines an errno on a “per thread” basis for routines and system calls that rely on errno.