1 .\" Copyright (c) 2013 Advanced Computing Technologies LLC
2 .\" Written by: John H. Baldwin <jhb@FreeBSD.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .Dd September 19, 2013
39 .Fn procctl "idtype_t idtype" "id_t id" "int cmd" "void *arg"
43 system call provides for control over processes.
48 arguments specify the set of processes to control.
49 If multiple processes match the identifier,
53 to control as many of the selected possibles as possible.
54 An error is only returned if no selected processes successfully complete
56 The following identifier types are supported:
57 .Bl -tag -width "Dv P_PGID"
59 Control the process with the process ID
62 Control processes belonging to the process group with the ID
66 The control request to perform is specified by the
69 The following commands are supported:
70 .Bl -tag -width "Dv PROC_SPROTECT"
72 Set process protection state.
73 This is used to mark a process as protected from being killed if the system
74 exhausts available memory and swap.
77 parameter must point to an integer containing an operation and zero or more
79 The following operations are supported:
80 .Bl -tag -width "Dv PPROT_CLEAR"
82 Mark the selected processes as protected.
84 Clear the protected state of selected processes.
87 The following optional flags are supported:
88 .Bl -tag -width "Dv PPROT_DESCE"
90 Apply the requested operation to all child processes of each selected process
91 in addition to each selected process.
95 mark all future child processes of each selected process as protected.
96 Future child processes will also mark all of their future child processes.
100 If an error occurs, a value of -1 is returned and
102 is set to indicate the error.
112 points outside the process's allocated address space.
116 argument specifies an unsupported command.
120 argument specifies an unsupported identifier type.
122 The calling process does not have permission to perform the requested
123 operation on any of the selected processes.
125 No processes matched the requested
130 An invalid operation or flag was passed in