Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > 02d4df70c13df840f464f867b6094c9c > files > 464

glibc-devel-2.2.4-6mdk.i586.rpm

/* Tst case by Jakub Jelinek <jakub@redhat.com>.  */
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>

static void *
task (void *p)
{
  sleep (30);
  return NULL;
}

int
main (void)
{
  pthread_t t;
  int status;

  status = pthread_create (&t, NULL, task, NULL);
  if (status)
    exit (status);

  status = pthread_detach (t);
  pthread_kill_other_threads_np ();
  return status;
}