#include <sbuild-personality.h>
Collaboration diagram for sbuild::personality:
Public Types | |
typedef unsigned long | type |
Personality type. | |
typedef runtime_error_custom< personality > | error |
Exception type. | |
Public Member Functions | |
personality () | |
The constructor. | |
personality (type persona) | |
The constructor. | |
personality (std::string const &persona) | |
The constructor. | |
~personality () | |
* The destructor. | |
std::string const & | get_name () const |
Get the name of the personality. | |
type | get () const |
Get the personality. | |
void | set () const |
Set the process personality. | |
Static Public Member Functions | |
static void | print_personalities (std::ostream &stream) |
Print a list of the available personalities. | |
Static Private Member Functions | |
static type | find_personality (std::string const &persona) |
Find a personality by name. | |
static std::string const & | find_personality (type persona) |
Find a personality by number. | |
Private Attributes | |
type | persona |
The personality type. | |
Static Private Attributes | |
static std::map< std::string, type > | personalities |
Mapping between personality name and type. | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, personality const &rhs) |
Print the personality name to a stream. |
A chroot may have a personality (also knows as a process execution domain) which is used to run non-native binaries. For example, running 32-bit Linux binaries on a 64-bit Linux system, or an SVR4 binary on a 32-bit Linux system. This is currently a Linux only feature; it does nothing on non-Linux systems. This is a wrapper around the personality(2) system call.
|
Exception type.
|
|
Personality type.
|
|
The constructor. On Linux systems, this is initialised with the current process' personality. On non-Linux systems, it is initialised as "undefined". |
|
The constructor.
|
|
The constructor.
|
|
* The destructor.
|
|
Find a personality by number.
|
|
Find a personality by name.
|
|
Get the personality.
|
|
Get the name of the personality.
|
|
Print a list of the available personalities.
|
|
Set the process personality. This sets the personality (if valid) using the personality(2) system call. If setting the personality fails, an error is thown. |
|
Print the personality name to a stream.
|
|
The personality type.
|
|
Mapping between personality name and type.
|