Main index | Section 1 | Options |
The options are:
| |
Remove protection from the specified processes. | |
| |
Apply the operation to all current children of the specified processes. | |
| |
Apply the operation to all future children of the specified processes. | |
| |
Apply the operation to all processes in the specified process group. | |
| |
Apply the operation to the specified process. | |
command | |
Execute command as a protected process. | |
Note that only one of the
Daemons can be protected on startup using <name > _oomprotect option from rc.conf(5).
pgrep Xorg | xargs protect -p
Protect all ssh sessions and their child processes:
pgrep sshd | xargs protect -dip
Remove protection from all current and future processes:
protect -cdi -p 1
Using ps(1) to check if the protect flag has been applied to the process:
ps -O flags,flags2 -p 64430
PID F F2 TT STAT TIME COMMAND
64430 10104002 00000001 5 S+ 0:00.00 ./main
^P ^PI
In the above example P points at the protected flag and PI points at the inheritance flag. The process is protected if P bit is set to 1. All children of this process will also be protected if PI bit is set to 1.
protect: procctl: Operation not permitted | The protect command does not have the required permissions to protect selected processes. There are many reasons why this could be the case, e.g.: |
protect is not executed by root. | |
protect is executed inside a jail(8), which is not supported at the moment. | |
PROTECT (1) | July 12, 2022 |
Main index | Section 1 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If at first you don't succeed, you must be a programmer. | ” |