[go: up one dir, main page]

getsid

Function getsid 

Source
pub fn getsid(pid: i32) -> Result<pid_t, Errno>
Expand description

getsid() returns the session ID of the process with process ID pid.

If pid is 0, getsid() returns the session ID of the calling process.

§Error

  • Errno::EPERM A process with process ID pid exists, but it is not in the same session as the calling process, and the implementation considers this an error.
  • Errno::ESRCH No process with process ID pid was found.

§Platform

This function only support standard POSIX implementation platform, so some system such as redox doesn’t supported.