deal with pthread_create error