[Previous] [Contents] [Next]

getsid()

Get the session ID of a process

Synopsis:

#include <unistd.h>

pid_t getsid( pid_t pid );

Library:

libc

Description:

The getsid() function determines the session ID for the given process ID, pid.

Returns:

The session ID, or -1 if an error occurs (errno is set).

Errors:

EINVAL
There isn't a process with the given ID.

Classification:

Standard Unix

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

errno, setsid()


[Previous] [Contents] [Next]