aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/bug-sleep.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-07-08 09:10:42 +0000
committerJakub Jelinek <jakub@redhat.com>2005-07-08 09:10:42 +0000
commit48f006fc656c70757103dc9efa92d5775717576b (patch)
tree49d57e1205b93471c3245fceab5dd5ac31ba743d /linuxthreads/bug-sleep.c
parent03d65262fdcc287ef8b691c7dff2f1a63cdd13c2 (diff)
downloadglibc-48f006fc656c70757103dc9efa92d5775717576b.tar
glibc-48f006fc656c70757103dc9efa92d5775717576b.tar.gz
glibc-48f006fc656c70757103dc9efa92d5775717576b.tar.bz2
glibc-48f006fc656c70757103dc9efa92d5775717576b.zip
Updated to fedora-glibc-20050708T0811
Diffstat (limited to 'linuxthreads/bug-sleep.c')
-rw-r--r--linuxthreads/bug-sleep.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/linuxthreads/bug-sleep.c b/linuxthreads/bug-sleep.c
deleted file mode 100644
index f29a6b73c0..0000000000
--- a/linuxthreads/bug-sleep.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* PR libc/4005 */
-#include <pthread.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <time.h>
-
-void *
-run_thread (void *a)
-{
- while (1)
- {
- sleep (10);
- }
- return 0;
-}
-
-int
-main (void)
-{
- pthread_t thr;
- void *result;
- alarm (4);
- printf ("Starting thread.\n");
- pthread_create (&thr, 0, run_thread, 0);
- sleep (2);
- printf ("Canceling thread.\n");
- pthread_cancel (thr);
- pthread_join (thr, &result);
- if (result == PTHREAD_CANCELED)
- printf ("Thread canceled.\n");
- else
- printf ("Thread exited.\n");
- return 0;
-}