]>
Commit | Line | Data |
---|---|---|
38fc42c8 JB |
1 | #include <sys/types.h> |
2 | #include <signal.h> | |
3 | #include <pthread.h> | |
4 | #include <stdio.h> | |
5 | ||
6 | int pid; | |
7 | ||
8 | void * | |
9 | child_func (void *dummy) | |
10 | { | |
11 | kill (pid, SIGKILL); | |
12 | exit (1); | |
13 | } | |
14 | ||
15 | int | |
16 | main () | |
17 | { | |
18 | pthread_t child; | |
19 | ||
20 | pid = getpid (); | |
21 | pthread_create (&child, 0, child_func, 0); | |
22 | for (;;) | |
23 | sleep (10000); | |
24 | } |