Function setsid
pub unsafe fn setsid() -> Result<i32, i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Create a new session if the calling process is not a process group leader.
§Examples
let ret = unsafe { nc::setsid() };
assert!(ret.is_ok());
let pid = unsafe { nc::getpid() };
assert_eq!(ret, Ok(pid));