prctl - Process operations
SYNOPSIS
prctl [-v] [-h|--help] [--version]
<-q|--unaligned=[silent|signal|default]> [command]
DESCRIPTION
prctl allows you to query or control certain process
behavior. At present, the only supported option is han
dling of unaligned memory accesses by a process. 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 or
send SIGBUS to the process.
prctl can optionally be followed by a command. If a com
mand is specified, prctl will exec the command with the
processor behavior set to as specified by the options. If
a command is not specified, prctl will fork a new shell
unless the command only queried the current settings. The
shell started by prctl will be as defined by the environ
ment 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.
OPTIONS
-v Verbose mode. In verbose mode, any new settings are
confirmed with a message on stdout.
--help Print usage information and exit.
--version
Print software version and exit.
-q Query the current settings for the process options
controllable by prctl.
--unaligned=[silent|signal|default]]
Set unaligned memory access behavior to not log the
access (silent), send SIGBUS to the process (sig
nal), or do the default (default). If a value is
not specified after "=", current setting is
returned.
one takes effect.
EXAMPLES
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.
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.
prctl --unaligned=
displays the current setting for unaligned memory
access handling.
prctl --unaligned= gdb tst
displays the current setting for unaligned memory
access handling and starts up a gdb session for the
program "tst".
NOTES
prctl works on 2.4.0 and above kernels only.
SEE ALSO
prctl(2)
AUTHOR
Khalid Aziz <khalid_aziz@hp.com>
LICENSE
This software is made available under the GNU General Pub
lic License (GPL) Version 2. This software comes with NO
WARRANTY.
Man(1) output converted with
man2html