]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/personality.2
personality.2: wfix
[thirdparty/man-pages.git] / 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 2003-01-01 "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 This function will return the current personality when
49 .I persona
50 equals 0xffffffff.
51 Otherwise, it will make the execution domain
52 referenced by
53 .I persona
54 the new execution domain of the calling process.
55 .SH RETURN VALUE
56 On success, the previous
57 .I persona
58 is returned.
59 On error, \-1 is returned, and
60 .I errno
61 is set appropriately.
62 .SH ERRORS
63 .TP
64 .B EINVAL
65 The kernel was unable to change the personality.
66 .SH CONFORMING TO
67 .BR personality ()
68 is Linux-specific and should not be used in programs intended to
69 be portable.