so that the main thread is not different from others. as a side effect, fix memory leak in pthread_create on error. - make pthread__stackid_setup return a error rather than calling err(2).