prctl(1)


NAME

   prctl - Process operations

SYNOPSIS

   prctl [-v] [-h|--help] [--version] <-q|<options....>> [command]

   where <options> are:

   --unaligned=[silent|signal|always-signal|default]

   --fpemu=[silent|signal|default]

   --mcekill=[early|late|default]

DESCRIPTION

   prctl  allows  you  to  query  or  control  certain  process  behavior.
   Supported options are:

   Unaligned memory access: 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.

   Floating point assistance faults: 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").

   Machine check memory corruption kill  policy:  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.

   prctl can optionally  be  followed  by  a  command.  If  a  command  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
   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.

   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|always-signal|default]]
          Set  unaligned  memory  access  behavior  to  not log the access
          (silent), send SIGBUS to the process (signal), or do the default
          (default).  On  IA-64  architecture  an additional value always-
          signal 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.

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

   If an option is specified multiple times, the last 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.

   --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.

SEE ALSO

   prctl(2)

AUTHOR

   Khalid Aziz <khalid.aziz@oracle.com>

LICENSE

   This  software  is  made available under the GNU General Public License
   (GPL) Version 2.  This software comes with NO WARRANTY.

                          Process operations                      PRCTL(1)





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.