[PATCH 06/10] kill: leeway deprecation of --pid invocation as command name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Who knows if anyone is linking or copying kill to a file name 'pid' and
using --pid option functionality that way, so lets inform these users and
get rid of command name hack after few releases.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 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 50f5cd2..e6c4000 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 will be deprecated in future.
 .TP
 \fB\-q\fR, \fB\-\-queue\fR \fIsigval\fR
 Use
diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index 2fecda3..11c8cd2 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)
+		warnx(_("use of 'kill --pid' option as command name will be deprecated in future"));
 	do_kill = 0;
 	check_all = 0;
 	/* Loop through the arguments.  Actually, -a is the only option
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux