Merge "Fix pthreads functions that should return ESRCH."