-}
-
-static void send_signal(int sign) {
- sigset_t mask, oldmask;
- int n_processes;
-
- assert_se(sigemptyset(&mask) == 0);
- assert_se(sigaddset(&mask, SIGCHLD) == 0);
- assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) == 0);
-
- if (kill(-1, SIGSTOP) < 0 && errno != ESRCH)
- log_warning("kill(-1, SIGSTOP) failed: %m");
-
- n_processes = killall(sign);
-
- if (kill(-1, SIGCONT) < 0 && errno != ESRCH)
- log_warning("kill(-1, SIGCONT) failed: %m");
-
- if (n_processes <= 0)
- goto finish;
-
- wait_for_children(n_processes, &mask);
-
-finish:
- sigprocmask(SIG_SETMASK, &oldmask, NULL);
-}
-
-static void ultimate_send_signal(int sign) {
- sigset_t mask, oldmask;
- int r;
-
- assert_se(sigemptyset(&mask) == 0);
- assert_se(sigaddset(&mask, SIGCHLD) == 0);
- assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) == 0);