chiark / gitweb /
bus-proxyd: explicitly address messages to unique and well-known name
[elogind.git] / src / core / killall.c
index eab48f7dcabdc9475a788b7bcd46256bb1ac614a..a6ff50a5a4a56fdcdcbbedac17ecfc3d23d2f6c7 100644 (file)
@@ -202,10 +202,10 @@ static int killall(int sig, Set *pids, bool send_sighup) {
 
 void broadcast_signal(int sig, bool wait_for_exit, bool send_sighup) {
         sigset_t mask, oldmask;
-        Set *pids = NULL;
+        _cleanup_set_free_ Set *pids = NULL;
 
         if (wait_for_exit)
-                pids = set_new(trivial_hash_func, trivial_compare_func);
+                pids = set_new(NULL);
 
         assert_se(sigemptyset(&mask) == 0);
         assert_se(sigaddset(&mask, SIGCHLD) == 0);
@@ -223,6 +223,4 @@ void broadcast_signal(int sig, bool wait_for_exit, bool send_sighup) {
                 wait_for_children(pids, &mask);
 
         assert_se(sigprocmask(SIG_SETMASK, &oldmask, NULL) == 0);
-
-        set_free(pids);
 }