From: Benjamin Robin Date: Mon, 8 Apr 2019 18:01:12 +0000 (+0200) Subject: core/killall: Add documentation about broadcast_signal() X-Git-Tag: v243-rc1~569^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12153%2Fhead;p=thirdparty%2Fsystemd.git core/killall: Add documentation about broadcast_signal() --- 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);