chiark / gitweb /
unit-printf: before resolving exec context specifiers check whether the object actual...
[elogind.git] / src / core / killall.c
index 5f589eaf47430dec365f932fbe9fcec23f0d62e8..55200ffa4847e2eb8053c51201a451335c094603 100644 (file)
@@ -150,7 +150,7 @@ static int killall(int sig) {
         return n_processes;
 }
 
-void broadcast_signal(int sig) {
+void broadcast_signal(int sig, bool wait_for_exit) {
         sigset_t mask, oldmask;
         int n_processes;
 
@@ -169,7 +169,8 @@ void broadcast_signal(int sig) {
         if (n_processes <= 0)
                 goto finish;
 
-        wait_for_children(n_processes, &mask);
+        if (wait_for_exit)
+                wait_for_children(n_processes, &mask);
 
 finish:
         sigprocmask(SIG_SETMASK, &oldmask, NULL);