2 * Check that signal injection works properly.
4 * Copyright (c) 2017-2018 Dmitry V. Levin <ldv@altlinux.org>
7 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include <asm/unistd.h>
18 syscall(__NR_exit_group, 0);
24 const struct sigaction act = { .sa_handler = handler };
25 if (sigaction(SIGUSR1, &act, NULL))
26 perror_msg_and_fail("sigaction");
30 sigaddset(&mask, SIGUSR1);
31 if (sigprocmask(SIG_UNBLOCK, &mask, NULL))
32 perror_msg_and_fail("sigprocmask");
34 syscall(__NR_chdir, ".");
35 syscall(__NR_exit_group, 1);