OSDN Git Service

109e6373c8fb88b3c52a6d5168a8660b9f976a32
[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 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
49 .BR personality ()
50 when
51 .I persona
52 equals 0xffffffff.
53 Otherwise, it will make the execution domain
54 referenced by
55 .I persona
56 the new execution domain of the calling process.
57 .SH RETURN VALUE
58 On success, the previous
59 .I persona
60 is returned.
61 On error, \-1 is returned, and
62 .I errno
63 is set appropriately.
64 .SH ERRORS
65 .TP
66 .B EINVAL
67 The kernel was unable to change the personality.
68 .SH CONFORMING TO
69 .BR personality ()
70 is Linux-specific and should not be used in programs intended to
71 be portable.
72 .SH COLOPHON
73 This page is part of release 3.64 of the Linux
74 .I man-pages
75 project.
76 A description of the project,
77 and information about reporting bugs,
78 can be found at
79 \%http://www.kernel.org/doc/man\-pages/.