File: prctl.1

package info (click to toggle)
prctl 1.7-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 88 kB
  • sloc: ansic: 358; makefile: 103
file content (137 lines) | stat: -rw-r--r-- 4,645 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.TH PRCTL 1 "Process operations"
.SH NAME
\fBprctl\fP
- Process operations
.SH SYNOPSIS
\fBprctl\fP
.RB "[\|" \-v "\|]"
.RB "[\|" \-h|--help "\|]"
.RB "[\|" \--version "\|]"
.RB "<\|" \-q|<options....> "\|>"
.RB "[\|" \c
.I command\c
\|]
.P
where \fB<options>\fP are:
.P
.RB "\|" --unaligned=[silent|signal|always-signal|default] "\|"
.P
.RB "\|" --fpemu=[silent|signal|default] "\|"
.P
.RB "\|" --mcekill=[early|late|default] "\|"
.SH DESCRIPTION
\fBprctl\fP
allows you to query or control certain process behavior. 
Supported options are:
.P
\fBUnaligned memory access:\fP
When a process performs an unaligned memory access, by default
the kernel would emulate the unaligned access correctly and 
log the unaligned access in syslog. This behavior can be changed 
so the kernel could either emulate the unaligned access correctly
without logging an error ("silent") or send SIGBUS to the process
("signal" and "always-signal"). "always-signal" is available on ia64
only.
.P
\fBFloating point assistance faults:\fP
when a process encounters a floating point assist fault, kernel
would invoke floating point emulator and log the floating point
assist fault. This behavior can be changed so the kernel could
either emulate floating point operation without logging an error 
("silent") or send SIGFPE to the offending process ("signal").
.P
\fBMachine check memory corruption kill policy:\fP
If a hardware memeory corruption is detected inside a thread's address
space, mmemory corruption kill policy determines whether the thread
received SIGBUS as soon as corruption is detected ("early"), when it
accesses corrupted memory ("late"), or use system wide default.
.P
\fBprctl\fP
can optionally be followed by a command. If a command is specified, 
\fBprctl\fP 
will exec the command with the processor behavior
set to as specified by the options. If a command is not specified,
\fBprctl\fP 
will fork a new shell unless the command only queried the current settings.
The shell started by prctl will be as defined by the environment 
variable SHELL. If 
environment variable SHELL is not defined, shell in the password
entry for the user will be started. If a shell is not found in the password
entry, bash will be started.
.SS OPTIONS
.TP
\fI-v\fP
Verbose mode. In verbose mode, any new settings are confirmed with a 
message on stdout.

.TP
\fI--help\fP
Print usage information and exit.

.TP
\fI--version\fP
Print software version and exit.

.TP
\fI-q\fP
Query the current settings for the process options controllable by prctl.

.TP
\fI--unaligned=[silent|signal|always-signal|default]]\fP
Set unaligned memory access behavior to not log the access (\fBsilent\fP), 
send SIGBUS to the process (\fBsignal\fP), or
do the default (\fBdefault\fP). On IA-64 architecture an additional 
value \fBalways-signal\fP is supported which causes a SIGBUS to be 
generated every time an unaligned access occurs. Refer to the section 
titled "Memory Datum Alignment and Atomicity" in "Intel IA-64 Architecture 
Software Developer's Manual: Volume 2" for details on when an unaligned
access would not generate signal normally. If a value is not specified 
after "=", current setting is returned.

.TP
\fI--fpemu=[silent|signal|default]]\fP
Set floating point assist fault behavior to not log the faulti
(\fBsilent\fP), send SIGFPE to the process (\fBsignal\fP), or
do the default (\fBdefault\fP). If a value is not specified after "=", 
current setting is returned.

.TP
If an option is specified multiple times, the last one takes effect.

.SH EXAMPLES
.TP
.B prctl --unaligned=signal
starts up a shell (as defined by the environment variable SHELL) and sets 
up any process running under this shell to be sent SIGBUS upon 
an unaligned memory access.

.TP
.B prctl --unaligned=signal gdb tst
starts up a gdb session for the program "tst" with the process set to receive
SIGBUS upon unligned memory access.

.TP
.B prctl --unaligned=
displays the current setting for unaligned memory access handling.

.TP
.B prctl --unaligned= gdb tst
displays the current setting for unaligned memory access handling and 
starts up a gdb session for the program "tst".

.SH NOTES
prctl works on 2.4.0 and above kernels only.
.P
--fpemu= option is specific to IPF (Itanium Processor Family, previously 
known as IA-64) and is supported on kernels 2.4.11 and above. Other 
architectures and kernels may return "Invalid argument" error.

.SH SEE ALSO
.BR prctl(2)
.SH AUTHOR
Khalid Aziz <khalid.aziz@oracle.com>
.SH LICENSE
This software is made available under the
GNU General Public License (GPL) Version 2.\" gpl.html#
This software comes with
NO WARRANTY.\" gpl.html#nowarr