Page MenuHomeFreeBSD

D30334.id89434.diff
No OneTemporary

D30334.id89434.diff

Index: usr.bin/protect/protect.1
===================================================================
--- usr.bin/protect/protect.1
+++ usr.bin/protect/protect.1
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 19, 2013
+.Dd May 18, 2021
.Dt PROTECT 1
.Os
.Sh NAME
@@ -68,6 +68,11 @@
or
.Fl g
flags may be specified when adjusting the state of existing processes.
+.Pp
+Daemons can be protected on startup using
+.Ao Ar name Ac Ns Va _oomprotect
+option from
+.Xr rc.conf 5 .
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
@@ -82,8 +87,31 @@
Remove protection from all current and future processes:
.Pp
.Dl "protect -cdi -p 1"
+.Pp
+Using
+.Xr ps 1
+to check if the protect flag has been applied to the process:
+.Pp
+.Dl "ps -O flags,flags2 -p 64430"
+.Pp
+.Dl " PID F F2 TT STAT TIME COMMAND"
+.Dl "64430 10104002 00000001 5 S+ 0:00.00 ./main"
+.Dl " ^P ^PI"
+.Pp
+In the above example
+.Nm P
+points at the protected flag and
+.Nm PI
+points at the iheritance flag.
+The process is protected if
+.Nm P
+bit is set to 1. All children of this process will also be protected if
+.Nm PI
+bit is set to 1.
.Sh SEE ALSO
-.Xr procctl 2
+.Xr ps 1 ,
+.Xr procctl 2 ,
+.Xr rc.conf 5
.Sh BUGS
If you protect a runaway process that allocates all memory the system will
deadlock.

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 29, 2:05 PM (9 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28083707
Default Alt Text
D30334.id89434.diff (1 KB)

Event Timeline