xref: /netbsd-src/external/gpl3/gdb/dist/sim/testsuite/cris/c/sig8.c (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
1*4b169a6bSchristos /* Check that TRT happens for an ignored catchable signal, single thread.
2*4b169a6bSchristos #xerror:
3*4b169a6bSchristos #output: Unimplemented signal: 14\n
4*4b169a6bSchristos #output: program stopped with signal 4 (*).\n
5*4b169a6bSchristos 
6*4b169a6bSchristos    Sure, it'd probably be better to support signals in single-thread too,
7*4b169a6bSchristos    but that's on an as-need basis, and I don't have a need for it yet.  */
8*4b169a6bSchristos 
9*4b169a6bSchristos #include <stdlib.h>
10*4b169a6bSchristos #include <stdio.h>
11*4b169a6bSchristos #include <sys/types.h>
12*4b169a6bSchristos #include <signal.h>
13*4b169a6bSchristos #include <unistd.h>
14*4b169a6bSchristos 
main(void)15*4b169a6bSchristos int main (void)
16*4b169a6bSchristos {
17*4b169a6bSchristos   signal (SIGALRM, SIG_IGN);
18*4b169a6bSchristos   kill (getpid (), SIGALRM);
19*4b169a6bSchristos   printf ("xyzzy\n");
20*4b169a6bSchristos   exit (0);
21*4b169a6bSchristos }
22