]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.threads/killed.c
2004-09-14 Andrew Cagney <cagney@gnu.org>
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.threads / killed.c
CommitLineData
38fc42c8
JB
1#include <sys/types.h>
2#include <signal.h>
3#include <pthread.h>
4#include <stdio.h>
5
6int pid;
7
8void *
9child_func (void *dummy)
10{
11 kill (pid, SIGKILL);
12 exit (1);
13}
14
15int
16main ()
17{
18 pthread_t child;
19
20 pid = getpid ();
21 pthread_create (&child, 0, child_func, 0);
22 for (;;)
23 sleep (10000);
24}