NAME

personality – set the process execution domain  

SYNOPSIS

#include <sys/personality.h>

int personality(unsigned long persona);  

DESCRIPTION

Linux supports different execution domains, or personalities, for each process. Among other things, execution domains tell Linux how to map signal numbers into signal actions. The execution domain system allows Linux to provide limited support for binaries compiled under other UNIX-like operating systems.

If persona is not 0xffffffff, then personality() sets the caller’s execution domain to the value specified by persona. Specifying persona as 0xffffffff provides a way of retrieving the current persona without changing it.

A list of the available execution domains can be found in <sys/personality.h>.  

RETURN VALUE

On success, the previous persona is returned. On error, -1 is returned, and errno is set appropriately.  

ERRORS

EINVAL
The kernel was unable to change the personality.
 

CONFORMING TO

personality() is Linux-specific and should not be used in programs intended to be portable.  

Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.