Commit Graph

21 Commits

Author SHA1 Message Date
erh de96a26e31 Allow the -l (long format) option to be used with pkill too. 2007-03-21 20:05:18 +00:00
pavel f5e7ca2447 Revert the changes done after newlock2 merge, except for the removal of
the now unused LSDEAD state. The current kernel headers are now
source-compatible with pre-newlock2 kernel headers again.

Approved by Andrew Doran.
2007-02-17 22:49:56 +00:00
ad 8966ad6a93 Further changes to use compat process flags mapped by sysctl. To be
revisited soon.
2007-02-10 18:20:12 +00:00
ad 401499f30e Sync with kernel changes introduced by merging the newlock2 branch. 2007-02-09 22:08:48 +00:00
wiz 5560f3fc8c Sort options; from jmc@openbsd. 2006-02-25 01:13:55 +00:00
kleink 7031652201 Exit with 2 on usage errors as documented. Noted by Christian Biere in
PR bin/21933.
2005-10-10 22:13:20 +00:00
kleink a050a27360 Downgrade failure to kill(2) (other than ESRCH) from fatal error to a
warning; otherwise processing aborts and possibly matching killees would
remain unsignalled.  This makes pkill match the Solaris behavior.
2005-10-08 12:05:55 +00:00
dsainty de09461393 Sprinkle const liberally 2005-07-20 12:54:30 +00:00
dsainty 0de40530b6 From discussion on tech-userlevel, change the comment formatting in the
changes applied in revision 1.10.  At the same time, expand the comments
a bit to make the code slightly clearer.  No code changes.
2005-07-20 12:40:27 +00:00
christos 41d3ce981c Fix more lint problems. 2005-07-16 19:50:32 +00:00
christos 140eaa6eeb - KNF
- better handling of errors and messages
- pass lint
2005-07-16 16:20:35 +00:00
christos 078c5c1a41 From David Sainty: If a process dissappears while we are signalling it, don't
count it as a match/error.
2005-07-16 15:53:56 +00:00
sketch 8e587b4ca1 Add a -i option to ignore case in the process match. 2005-03-16 08:52:20 +00:00
abs 24cba1ac9a If a user or group is not known, report the problem user/group, rather than
the first user/group. Caused huge fun in error messages from large script.
Old:	pgrep -u root,NoSuchUser,daemon	-> pgrep: unknown user `root'
Now:	pgrep -u root,NoSuchUser,daemon	-> pgrep: unknown user `NoSuchUser'
2005-03-02 15:31:44 +00:00
soren c87f3766c2 Make usage() not overflow 80 char lines. 2004-02-15 17:03:30 +00:00
itojun 144fd6a2bf typo fix. do not go suicide by mistake. from millert@openbsd 2004-01-06 07:35:58 +00:00
kleink f624532a37 Add missing -u euid option to optstring; from Michael van Elst in
PR bin/18827.
2002-10-27 11:49:34 +00:00
ad eabe280b0e Exclude system processes when the match is inverted. 2002-03-06 12:02:18 +00:00
augustss ee19c52139 Fix 3 bugs in signal number decoding:
* invoking pkill without any arguments gave a core
  * an initial numeric prefix of a signal name was ignored, e.g. -88sigint
  * argc was not updated when the signal number was decoded.
2002-03-04 13:47:08 +00:00
ad 38b296bf9f s/LINT/lint/ 2002-03-01 11:29:46 +00:00
ad 3b8a0d4f4f pgrep and pkill: search the process table for processes with a particular
set of characteristics, and either print or signal the matching set. Mostly
compatible with the Solaris commands of the same name.
2002-03-01 11:21:58 +00:00