Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > updates > by-pkgid > 7d7cc94ee97a4ebfd512cafc532c5dac > files > 1372

glibc-devel-2.3.1-10.1.91mdk.ppc.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;
}