mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
* gdb.threads/killed.exp, gdb.threads/killed.c: New test.
This commit is contained in:
24
gdb/testsuite/gdb.threads/killed.c
Normal file
24
gdb/testsuite/gdb.threads/killed.c
Normal file
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user