2 * Check decoding of pause syscall.
4 * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
5 * Copyright (c) 2016 Fei Jie <feij.fnst@cn.fujitsu.com>
8 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include <asm/unistd.h>
19 # include <sys/time.h>
30 const struct sigaction act = { .sa_handler = handler };
31 if (sigaction(SIGALRM, &act, NULL))
32 perror_msg_and_fail("sigaction");
36 sigaddset(&mask, SIGALRM);
37 if (sigprocmask(SIG_UNBLOCK, &mask, NULL))
38 perror_msg_and_fail("sigprocmask");
40 const struct itimerval itv = { .it_value.tv_usec = 123456 };
41 if (setitimer(ITIMER_REAL, &itv, NULL))
42 perror_msg_and_fail("setitimer");
46 printf("pause() = -1 ENOSYS (%m)\n");
48 printf("pause() = ? ERESTARTNOHAND"
49 " (To be restarted if no handler)\n");
51 puts("+++ exited with 0 +++");
57 SKIP_MAIN_UNDEFINED("__NR_pause")