OSDN Git Service

254cec5c1c98c6f69b709438327a0fbca63092d7
[linuxjm/LDP_man-pages.git] / original / man2 / personality.2
1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Created   Sat Aug 21 1995     Thomas K. Dyas <tdyas@eden.rutgers.edu>
26 .\"
27 .\" typo corrected, aeb, 950825
28 .\" added layout change from joey, 960722
29 .\" changed prototype, documented 0xffffffff, aeb, 030101
30 .\" Modified 2004-11-03 patch from Martin Schulze <joey@infodrom.org>
31 .\"
32 .TH PERSONALITY 2 2014-04-15 "Linux" "Linux Programmer's Manual"
33 .SH NAME
34 personality \- set the process execution domain
35 .SH SYNOPSIS
36 .B #include <sys/personality.h>
37 .sp
38 .BI "int personality(unsigned long " persona );
39 .SH DESCRIPTION
40 Linux supports different execution domains, or personalities, for each
41 process.
42 Among other things, execution domains tell Linux how to map
43 signal numbers into signal actions.
44 The execution domain system allows
45 Linux to provide limited support for binaries compiled under other
46 UNIX-like operating systems.
47
48 If
49 .I persona
50 is not
51 0xffffffff, then
52 .BR personality ()
53 sets the caller's execution domain to the value specified by
54 .IR persona .
55 Specifying
56 .IR persona
57 as 0xffffffff provides a way of retrieving
58 the current persona without changing it.
59
60 A list of the available execution domains can be found in
61 .IR <sys/personality.h> .
62 .SH RETURN VALUE
63 On success, the previous
64 .I persona
65 is returned.
66 On error, \-1 is returned, and
67 .I errno
68 is set appropriately.
69 .SH ERRORS
70 .TP
71 .B EINVAL
72 The kernel was unable to change the personality.
73 .SH CONFORMING TO
74 .BR personality ()
75 is Linux-specific and should not be used in programs intended to
76 be portable.
77 .SH COLOPHON
78 This page is part of release 3.67 of the Linux
79 .I man-pages
80 project.
81 A description of the project,
82 information about reporting bugs,
83 and the latest version of this page,
84 can be found at
85 \%http://www.kernel.org/doc/man\-pages/.