summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/cris/c/sig7.c
blob: 2e70a430431176e1a5c75514306d46f7211fc4e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Check unsupported case of sigaction syscall.
#notarget: cris*-*-elf
#xerror:
#output: Unimplemented rt_sigaction syscall (0x8, 0x3df*\n
#output: program stopped with signal 4.\n
*/
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>

int
main (void)
{
  struct sigaction sa;
  sa.sa_sigaction = NULL;
  sa.sa_flags = SA_RESTART | SA_SIGINFO;
  sigemptyset (&sa.sa_mask);

  if (sigaction (SIGFPE, &sa, NULL) != 0)
    abort ();

  printf ("xyzzy\n");
  exit (0);
}