diff options
Diffstat (limited to 'sim/testsuite/cris/c/sig8.c')
-rw-r--r-- | sim/testsuite/cris/c/sig8.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sim/testsuite/cris/c/sig8.c b/sim/testsuite/cris/c/sig8.c new file mode 100644 index 0000000..ea2d7f5 --- /dev/null +++ b/sim/testsuite/cris/c/sig8.c @@ -0,0 +1,21 @@ +/* Check that TRT happens for an ignored catchable signal, single thread. +#xerror: +#output: Unimplemented signal: 14\n +#output: program stopped with signal 4 (*).\n + + Sure, it'd probably be better to support signals in single-thread too, + but that's on an as-need basis, and I don't have a need for it yet. */ + +#include <stdlib.h> +#include <stdio.h> +#include <sys/types.h> +#include <signal.h> +#include <unistd.h> + +int main (void) +{ + signal (SIGALRM, SIG_IGN); + kill (getpid (), SIGALRM); + printf ("xyzzy\n"); + exit (0); +} |