From: Sami Kerola Date: Sun, 9 Mar 2014 17:45:35 +0000 (-0500) Subject: kill: deprecat invocation as 'pid' command name X-Git-Tag: v2.25-rc1~329^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5b057b3422504a671ee588fa66574ae876521f1;p=thirdparty%2Futil-linux.git kill: deprecat invocation as 'pid' command name Enabling options by renaming command is both unexpected and undocumented. This magic is now deprecated and with remark of removal of this functionality in future. Signed-off-by: Sami Kerola --- diff --git a/misc-utils/kill.1 b/misc-utils/kill.1 index 50f5cd2061..610f8fb72c 100644 --- a/misc-utils/kill.1 +++ b/misc-utils/kill.1 @@ -88,6 +88,11 @@ Specify that .B kill should only print the process id (pid) of the named processes, and not send any signals. +.IP +The \-\-pid option functionality is enabled when the command +copied or linked to name +.BR pid . +This functionality is deprecated, and will not be removed in March 2016. .TP \fB\-q\fR, \fB\-\-queue\fR \fIsigval\fR Use diff --git a/misc-utils/kill.c b/misc-utils/kill.c index 2fecda39e0..c9c1bda1a2 100644 --- a/misc-utils/kill.c +++ b/misc-utils/kill.c @@ -170,6 +170,8 @@ int main(int argc, char **argv) numsig = SIGTERM; do_pid = (!strcmp(program_invocation_short_name, "pid")); /* Yecch */ + if (do_pid) /* FIXME: remove in March 2016. */ + warnx(_("use of 'kill --pid' option as command name is deprecated")); do_kill = 0; check_all = 0; /* Loop through the arguments. Actually, -a is the only option