Home | History | Annotate | Line # | Download | only in c
      1  1.1  christos /* Test that TRT happens for invalid rt_sigsuspend calls.  Single-thread.
      2  1.1  christos #progos: linux
      3  1.1  christos #xerror:
      4  1.1  christos #output: Unimplemented rt_sigsuspend syscall arguments (0x1, 0x2)\n
      5  1.1  christos #output: program stopped with signal 4 (*).\n
      6  1.1  christos */
      7  1.1  christos 
      8  1.1  christos #include <unistd.h>
      9  1.1  christos #include <sys/syscall.h>
     10  1.1  christos #include <stdio.h>
     11  1.1  christos #include <stdlib.h>
     12  1.1  christos #include <errno.h>
     13  1.1  christos 
     14  1.1  christos int main (void)
     15  1.1  christos {
     16  1.1  christos   int err = syscall (SYS_rt_sigsuspend, 1, 2);
     17  1.1  christos   if (err == -1 && errno == ENOSYS)
     18  1.1  christos     printf ("ENOSYS\n");
     19  1.1  christos   printf ("xyzzy\n");
     20  1.1  christos   exit (0);
     21  1.1  christos }
     22