protect.1 (55648840de371b7e4cb2704cb5d47d92dff11d45) protect.1 (828378a6d333ac1bc2ecdcef64d36b7720bd83fc)
1.\" Copyright (c) 2013 Advanced Computing Technologies LLC
2.\" Written by: John H. Baldwin <jhb@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 32 unchanged lines hidden (view full) ---

41.Sh DESCRIPTION
42The
43.Nm
44command is used to mark processes as protected.
45The kernel does not kill protected processes when swap space is exhausted.
46Note that this protected state is not inherited by child processes by default.
47.Pp
48The options are:
1.\" Copyright (c) 2013 Advanced Computing Technologies LLC
2.\" Written by: John H. Baldwin <jhb@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 32 unchanged lines hidden (view full) ---

41.Sh DESCRIPTION
42The
43.Nm
44command is used to mark processes as protected.
45The kernel does not kill protected processes when swap space is exhausted.
46Note that this protected state is not inherited by child processes by default.
47.Pp
48The options are:
49.Bl -tag -width indent
49.Bl -tag -width XXXXXXXXXX
50.It Fl c
51Remove protection from the specified processes.
52.It Fl d
53Apply the operation to all current children of the specified processes.
54.It Fl i
55Apply the operation to all future children of the specified processes.
56.It Fl g Ar pgrp
57Apply the operation to all processes in the specified process group.

--- 11 unchanged lines hidden (view full) ---

69.Fl g
70flags may be specified when adjusting the state of existing processes.
71.Sh EXIT STATUS
72.Ex -std
73.Sh EXAMPLES
74Mark the Xorg server as protected:
75.Pp
76.Dl "pgrep Xorg | xargs protect -p"
50.It Fl c
51Remove protection from the specified processes.
52.It Fl d
53Apply the operation to all current children of the specified processes.
54.It Fl i
55Apply the operation to all future children of the specified processes.
56.It Fl g Ar pgrp
57Apply the operation to all processes in the specified process group.

--- 11 unchanged lines hidden (view full) ---

69.Fl g
70flags may be specified when adjusting the state of existing processes.
71.Sh EXIT STATUS
72.Ex -std
73.Sh EXAMPLES
74Mark the Xorg server as protected:
75.Pp
76.Dl "pgrep Xorg | xargs protect -p"
77.Pp
77Protect all ssh sessions and their child processes:
78.Pp
79.Dl "pgrep sshd | xargs protect -dip"
78Protect all ssh sessions and their child processes:
79.Pp
80.Dl "pgrep sshd | xargs protect -dip"
81.Pp
80Remove protection from all current and future processes:
81.Pp
82.Dl "protect -cdi -p 1"
83.Sh SEE ALSO
84.Xr pprotect 2
85.Sh BUGS
86If you protect a runaway process that allocates all memory the system will
87deadlock.
88.Pp
89Inheritance of the protected state is not yet implemented.
82Remove protection from all current and future processes:
83.Pp
84.Dl "protect -cdi -p 1"
85.Sh SEE ALSO
86.Xr pprotect 2
87.Sh BUGS
88If you protect a runaway process that allocates all memory the system will
89deadlock.
90.Pp
91Inheritance of the protected state is not yet implemented.