]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/personality.2
Patches from Martin Schulze <joey@infodeom.org>
[thirdparty/man-pages.git] / man2 / personality.2
1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Created Sat Aug 21 1995 Thomas K. Dyas <tdyas@eden.rutgers.edu>
24 .\"
25 .\" typo corrected, aeb, 950825
26 .\" added layout change from joey, 960722
27 .\" changed prototype, documented 0xffffffff, aeb, 030101
28 .\" Modified 2004-11-03 patch from Martin Schulze <joey@infodeom.org>
29 .\"
30 .TH PERSONALITY 2 2003-01-01 "Linux 2.0" "Linux Programmer's Manual"
31 .SH NAME
32 personality \- set the process execution domain
33 .SH SYNOPSIS
34 .B #include <sys/personality.h>
35 .sp
36 .BI "int personality(unsigned long " persona );
37 .SH DESCRIPTION
38 Linux supports different execution domains, or personalities, for each
39 process. Among other things, execution domains tell Linux how to map
40 signal numbers into signal actions. The execution domain system allows
41 Linux to provide limited support for binaries compiled under other
42 Unix-like operating systems.
43
44 This function will return the current
45 .B personality
46 when
47 .I persona
48 equals 0xffffffff. Otherwise, it will make the execution domain
49 referenced by
50 .I persona
51 the new execution domain of the current process.
52 .SH "RETURN VALUE"
53 On success, the previous
54 .I persona
55 is returned. On error, \-1 is returned, and
56 .I errno
57 is set appropriately.
58 .SH ERRORS
59 .TP
60 .B EINVAL
61 The kernel was unable to change the personality.
62 .SH "CONFORMING TO"
63 .B personality
64 is Linux-specific and should not be used in programs intended to be portable.