aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/pkill/pkill.1
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2006-11-23 11:55:17 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2006-11-23 11:55:17 +0000
commita6afe5ada834e957bbb240dac940c329cc78f7a7 (patch)
tree8ccb68474bfd6de2bc2eaba6ee731a4e44618f92 /usr.bin/pkill/pkill.1
parent20739dfa44dbb70dcb08e0401a6fc986ca596f93 (diff)
downloadsrc-a6afe5ada834e957bbb240dac940c329cc78f7a7.tar.gz
src-a6afe5ada834e957bbb240dac940c329cc78f7a7.zip
Fix and extend the -j option to pkill/pgrep WRT the jail
wildcard specifications. Earlier the only wildcard syntax was "-j 0" for "any jail". There were at least two shortcomings in it: First, jail ID 0 was abused; it meant "no jail" in other utils, e.g., ps(1). Second, it was impossible to match processed not in jail, which could be useful to rc.d developers. Therefore a new syntax is introduced: "-j any" means any jail while "-j none" means out of jail. The old syntax is preserved for compatibility, but now it's deprecated because it's limited and confusing. Update the respective regression tests. While I'm here, make the tests more complex but sensitive: Start several processes, some in jail and some out of jail, so we can detect that only the right processes are killed by pkill or matched by pgrep. Reviewed by: gad, pjd MFC after: 1 week
Notes
Notes: svn path=/head/; revision=164558
Diffstat (limited to 'usr.bin/pkill/pkill.1')
-rw-r--r--usr.bin/pkill/pkill.121
1 files changed, 19 insertions, 2 deletions
diff --git a/usr.bin/pkill/pkill.1 b/usr.bin/pkill/pkill.1
index 7db3307f4af3..cf202fdc2468 100644
--- a/usr.bin/pkill/pkill.1
+++ b/usr.bin/pkill/pkill.1
@@ -36,7 +36,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 16, 2005
+.Dd November 23, 2006
.Dt PKILL 1
.Os
.Sh NAME
@@ -146,7 +146,12 @@ Ignore case distinctions in both the process table and the supplied pattern.
Restrict matches to processes inside jails with a jail ID in the comma-separated
list
.Ar jid .
-The value zero is taken to mean any jail ID.
+The value
+.Dq Li any
+matches processes in any jail.
+The value
+.Dq Li none
+matches processes not in jail.
.It Fl l
Long output.
Print the process name in addition to the process ID for each matching
@@ -240,6 +245,18 @@ Invalid options were specified on the command line.
.It 3
An internal error occurred.
.El
+.Sh COMPATIBILITY
+Historically the option
+.Dq Fl j Li 0
+means any jail, although in other utilities such as
+.Xr ps 1
+jail ID
+.Li 0
+has the opposite meaning, not in jail.
+Therefore
+.Dq Fl j Li 0
+is deprecated, and its use is discouraged in favor of
+.Dq Fl j Li any .
.Sh SEE ALSO
.Xr kill 1 ,
.Xr killall 1 ,