diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-09-03 20:02:48 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-09-03 20:02:48 +0000 |
commit | 38fc42c80d8ff9d2ca12e20d8f164e8f2f4693d3 (patch) | |
tree | 3e47b4cf9d54055bfbc8bef39f27f4f61bd20d7e /gdb/testsuite/gdb.threads/killed.c | |
parent | e26fb1d7e5d19253dd7c61cef8b8adb5fa1cdbb2 (diff) | |
download | gdb-38fc42c80d8ff9d2ca12e20d8f164e8f2f4693d3.zip gdb-38fc42c80d8ff9d2ca12e20d8f164e8f2f4693d3.tar.gz gdb-38fc42c80d8ff9d2ca12e20d8f164e8f2f4693d3.tar.bz2 |
* gdb.threads/killed.exp, gdb.threads/killed.c: New test.
Diffstat (limited to 'gdb/testsuite/gdb.threads/killed.c')
-rw-r--r-- | gdb/testsuite/gdb.threads/killed.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.threads/killed.c b/gdb/testsuite/gdb.threads/killed.c new file mode 100644 index 0000000..6cb3928 --- /dev/null +++ b/gdb/testsuite/gdb.threads/killed.c @@ -0,0 +1,24 @@ +#include <sys/types.h> +#include <signal.h> +#include <pthread.h> +#include <stdio.h> + +int pid; + +void * +child_func (void *dummy) +{ + kill (pid, SIGKILL); + exit (1); +} + +int +main () +{ + pthread_t child; + + pid = getpid (); + pthread_create (&child, 0, child_func, 0); + for (;;) + sleep (10000); +} |