2.3.3-86
[glibc/history.git] / linuxthreads / Examples / ex16.c
blob6509ae45152465ead85d2c2cd5794dd4026a0f1b
1 /* Tst case by Jakub Jelinek <jakub@redhat.com>. */
2 #include <stdlib.h>
3 #include <unistd.h>
4 #include <pthread.h>
6 static void *
7 task (void *p)
9 sleep (30);
10 return NULL;
13 int
14 main (void)
16 pthread_t t;
17 int status;
19 status = pthread_create (&t, NULL, task, NULL);
20 if (status)
21 exit (status);
23 status = pthread_detach (t);
24 pthread_kill_other_threads_np ();
25 return status;