1 /* Invoke pthread_detach() with an invalid thread ID. */
8 static void* thread_func(void* arg
)
13 int main(int argc
, char** argv
)
17 pthread_create(&thread
, NULL
, thread_func
, NULL
);
18 pthread_join(thread
, NULL
);
20 /* Invoke pthread_detach() with the thread ID of a joined thread. */
21 pthread_detach(thread
);
23 /* Invoke pthread_detach() with an invalid thread ID. */
24 pthread_detach(thread
+ 8);
26 fprintf(stderr
, "Finished.\n");