1/* 2#notarget: cris*-*-elf 3*/ 4 5#include <stdio.h> 6#include <signal.h> 7#include <stdlib.h> 8 9/* Like sig1.c, but using sigaction. */ 10 11void 12leave (int n, siginfo_t *info, void *x) 13{ 14 abort (); 15} 16 17int 18main (void) 19{ 20 struct sigaction sa; 21 sa.sa_sigaction = leave; 22 sa.sa_flags = SA_RESTART | SA_SIGINFO; 23 sigemptyset (&sa.sa_mask); 24 25 /* Check that the sigaction syscall (for signal) is interpreted, though 26 possibly ignored. */ 27 if (sigaction (SIGFPE, &sa, NULL) != 0) 28 abort (); 29 30 printf ("pass\n"); 31 exit (0); 32} 33