From: Craig Small Date: Tue, 28 Jan 2014 11:35:26 +0000 (+1100) Subject: kill for PID -1 restored X-Git-Tag: v3.3.10~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4359cf069819d9fb53493933e00d9af5c37bced5;p=procps-ng kill for PID -1 restored Both the man page and the shell builtin kill mention you can use PID -1, which means nuke everything you can get at. Alas this "fun" option was missing and the only way to get around it was with "kill -HUP -- -1". This small change means kill -HUP -1 is back for all those destructive types. The error was introduced when the argument parser was fixed for other problems. Thanks to Mike for pointing this out. Signed-off-by: Craig Small --- diff --git a/skill.c b/skill.c index 5c8192a6..1c99985b 100644 --- a/skill.c +++ b/skill.c @@ -477,6 +477,12 @@ static void __attribute__ ((__noreturn__)) display_kill_version(); exit(EXIT_SUCCESS); case '?': + /* Special case is -1 which means all except init */ + if (optopt == '1') { + if (kill(-1, signo) != 0) + exitvalue = EXIT_FAILURE; + exit(exitvalue); + } if (!isdigit(optopt)) { xwarnx(_("invalid argument %c"), optopt); kill_usage(stderr);