Skip to main content

setsid

Function setsid 

Source
pub fn setsid() -> SysprimsResult<u32>
Expand description

Create a new session for the current process.

This is a thin wrapper around the setsid(2) system call.

§Safety

This must not be called if the current process is a process group leader, as setsid() will fail with EPERM. Fork first if needed.

§Returns

The new session ID (which equals the process ID) on success.