Function nix::sys::personality::set[][src]

pub fn set(persona: Persona) -> Result<Persona>
Expand description

Set the current process personality.

Returns a Result containing the previous personality for the process, as a Persona.

For more information, see personality(2)

NOTE: This call replaces the current personality entirely. To update the personality, first call get() and then set() with the modified persona.

Example:

let mut pers = personality::get().unwrap();
assert!(!pers.contains(Persona::ADDR_NO_RANDOMIZE));
personality::set(pers | Persona::ADDR_NO_RANDOMIZE);