Library /sys$common/syshlp/helplib.hlb  —  CRTL  getsid
    Gets the process group ID of the session leader.

    This function is supported on OpenVMS Integrity servers and
    Alpha only.

    Format

      #include  <unistd.h>

      pid_t getsid  (pid_t pid);

1  –  Argument

 pid

    The process ID of the process whose session leader process group
    ID is being requested.

2  –  Description

    The getsid function obtains the process group ID of the process
    that is the session leader of the process specified by pid. If
    pid is (pid_t)0, it specifies the calling process.

    This function requires that long (32-bit) UID/GID support be
    enabled. See 32-Bit UID and GID Macro (Integrity servers, Alpha)
    for more information.

3  –  Return Values

    x                  The process group ID of the session leader of
                       the specified process.
    (pid_t)-1          Indicates an error. The function sets errno to
                       one of the following values:

                       o  EPERM - The process specified by pid is
                          not in the same session as the calling
                          process, and the implementation does not
                          allow access to the process group ID of
                          the session leader of that process from the
                          calling process.

                       o  ESRCH - There is no process with a process
                          ID of pid.
Close Help