From 763e7b5da6073e326a988685f6539aaf7f2ab115 Mon Sep 17 00:00:00 2001 From: Benjamin Robin Date: Mon, 8 Apr 2019 20:01:12 +0200 Subject: [PATCH] core/killall: Add documentation about broadcast_signal() --- src/core/killall.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/killall.c b/src/core/killall.c index 056b36f07bb..07109196407 100644 --- a/src/core/killall.c +++ b/src/core/killall.c @@ -252,6 +252,12 @@ int broadcast_signal(int sig, bool wait_for_exit, bool send_sighup, usec_t timeo sigset_t mask, oldmask; _cleanup_set_free_ Set *pids = NULL; + /* Send the specified signal to all remaining processes, if not excluded by ignore_proc(). + * Return: + * - The number of processes still "alive" after the timeout (that should have been killed) + * if the function needs to wait for the end of the processes (wait_for_exit). + * - Otherwise, the number of processes to which the specified signal was sent */ + if (wait_for_exit) pids = set_new(NULL); -- 2.47.3