/* STEPS: 1.Create a joinable thread 2.Detach that thread 3.Verify that the thread did not terminate because of this  */
static void* a_thread_func()
/* STEPS: 1.Create a joinable thread 2.Detach that thread 3.Verify that the thread did not terminate because of this  */
static void* a_thread_func()
{
    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
    sleep(10);
    perror("Thread couldn't be canceled (at cleanup time), timing out\n");
    pthread_exit(0);
    return NULL;
}