Get the session id of this or another process.
fn session(pid: Option<i32>) -> Result<i32, Errno>
The process whose session id to return or None to get the session id of this process.
None
getsid(2)