1*4b169a6bSchristos /* Check unsupported case of sigaction syscall. 2*4b169a6bSchristos #progos: linux 3*4b169a6bSchristos #xerror: 4*4b169a6bSchristos #output: Unimplemented rt_sigaction syscall (0x8, 0x3df*\n 5*4b169a6bSchristos #output: program stopped with signal 4 (*).\n 6*4b169a6bSchristos */ 7*4b169a6bSchristos #include <stdio.h> 8*4b169a6bSchristos #include <signal.h> 9*4b169a6bSchristos #include <stdlib.h> 10*4b169a6bSchristos #include <errno.h> 11*4b169a6bSchristos 12*4b169a6bSchristos int main(void)13*4b169a6bSchristosmain (void) 14*4b169a6bSchristos { 15*4b169a6bSchristos struct sigaction sa; 16*4b169a6bSchristos int err; 17*4b169a6bSchristos sa.sa_sigaction = NULL; 18*4b169a6bSchristos sa.sa_flags = SA_RESTART | SA_SIGINFO; 19*4b169a6bSchristos sigemptyset (&sa.sa_mask); 20*4b169a6bSchristos 21*4b169a6bSchristos err = sigaction (SIGFPE, &sa, NULL); 22*4b169a6bSchristos if (err == -1 && errno == ENOSYS) 23*4b169a6bSchristos printf ("ENOSYS\n"); 24*4b169a6bSchristos 25*4b169a6bSchristos printf ("xyzzy\n"); 26*4b169a6bSchristos exit (0); 27*4b169a6bSchristos } 28