e97feb9a30
signal processes matching criteria o Based on current NetBSD's pgrep(1) and pkill(1) with the following differences: 1) -STABLE version does not support filtering by session ID since this information is only available in kernel space. -CURRENT supports this. 2) Added -M and -N flags following ps(1). Therefore, drop additional privileges (drop_privs) if any of those flags are defined. 3) kvm access without sgid o Items (2) and (3) are based on jmallett code sent to me for inspiration. :) Great thanks to jmallett for that. Obtained from: NetBSD CVS (original pkill/pgrep code)
13 lines
450 B
Plaintext
13 lines
450 B
Plaintext
[ excerpt from commands' man page ]
|
|
|
|
Port of NetBSD's pgrep(1) and pkill(1) commands which either find
|
|
or signal processes matching criteria.
|
|
|
|
The pgrep command searches the process table on the running system
|
|
and prints the process IDs of all processes that match the criteria
|
|
given on the command line.
|
|
|
|
The pkill command searches the process table on the running system
|
|
and signals all processes that match the criteria given on the
|
|
command line.
|