Module Name: src Committed By: kre Date: Sun Aug 30 19:41:39 UTC 2020
Modified Files: src/bin/kill: kill.1 Log Message: Note that negative pid args are permitted (indicating to send to the pgrp abs(pid)) and indicate that -- is (strictly) needed if the first pid arg (there often is only one) is negative - though this implementation works without it if a signal to send has been explicitly given, but whereas 'kill 1234" is valid (send SIGTERM to pid 1234) "kill -1234" will generate a usage error from the attempt to send signal 1234 to nothing, to send SIGTERM to pgrp 1234 it needs to be "kill -- -1234" (or "kill -s term -1234"). While here do a couple of markup improvements, and allow for the possibility that users might be running the builtin kill from some shell other than csh or sh. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/bin/kill/kill.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/kill/kill.1 diff -u src/bin/kill/kill.1:1.31 src/bin/kill/kill.1:1.32 --- src/bin/kill/kill.1:1.31 Sun Aug 30 16:10:40 2020 +++ src/bin/kill/kill.1 Sun Aug 30 19:41:39 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: kill.1,v 1.31 2020/08/30 16:10:40 kre Exp $ +.\" $NetBSD: kill.1,v 1.32 2020/08/30 19:41:39 kre Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)kill.1 8.2 (Berkeley) 4/28/95 .\" -.Dd May 6, 2020 +.Dd August 30, 2020 .Dt KILL 1 .Os .Sh NAME @@ -95,7 +95,9 @@ of the default .Dv TERM . .El .Pp -The following pids have special meanings: +The following +.Ar pid Ns s +have special meanings: .Bl -tag -width Ds -compact .It -1 If superuser, broadcast the signal to all processes; otherwise broadcast @@ -104,6 +106,24 @@ to all processes belonging to the user. Broadcast the signal to all processes in the current process group belonging to the user. .El +Any other negative +.Ar pid +is interpreted as the negative of a process group identifier, +and the signal is sent to all members of that group. +.Pp +Note that while not required by this implementation, +if the first +.Ar pid +operand is negative, it should be preceded by the +.Dq \&-- +end of options indicator, to avoid the +.Ar pid +being treated as yet more options. +That is always required if no specific signal is specified +and the first +.Ar pid +is negative, or that pid would be treated as the +.Ar signal_number . .Pp Some of the more commonly used signals: .Bl -tag -width Ds -compact @@ -143,9 +163,9 @@ so process id's are not as often used as .Nm arguments. See -.Xr csh 1 -or +.Xr csh 1 , .Xr sh 1 +or the man page for the shell in use for details. .Sh DIAGNOSTICS .Ex -std