From c5b057b3422504a671ee588fa66574ae876521f1 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 9 Mar 2014 12:45:35 -0500 Subject: [PATCH] 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 --- misc-utils/kill.1 | 5 +++++ misc-utils/kill.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/misc-utils/kill.1 b/misc-utils/kill.1 index 50f5cd206..610f8fb72 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 2fecda39e..c9c1bda1a 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