devela::_dep::nc::call

Function setuid

pub unsafe fn setuid(uid: u32) -> Result<(), i32> 
Available on crate feature dep_nc only.
Expand description

Set user ID of the calling process to uid.

§Examples

let ret = unsafe { nc::setuid(0) };
assert_eq!(ret, Err(nc::EPERM));