#include <pthread.h>
int pthread_detach(pthread_t thread);
// Returns 0 on success, or a positive error number on error
Source Code: threads/detached_attrib.c
from TLPI.
Quick Question:
What happens if we do do a pthread_detach(pthread_self());
inside the threadFunc
in the following program?
Source Code: threads/simple_thread.c
from TLPI