Thread Termination [cont'd]
status, if not NULL, returns the void * returned by the thread when it terminates
a thread can terminate by
- returning from func()
- the main() function exiting (all threads terminate)
- pthread_exit()
void pthread_exit(void *status);
a second way to exit, returns status explicitly
status must not point to an object local to thread, as these disappear when the thread terminates