*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> getsid (2)              
Title
Content
Arch
Section
 

GETSID(2)

Contents


NAME    [Toc]    [Back]

     getsid - get process session

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     pid_t
     getsid(pid_t pid);

DESCRIPTION    [Toc]    [Back]

     The session ID of the process identified by pid is  returned
by getsid().
     If  pid is zero, getsid() returns the session ID of the current process.

RETURN VALUES    [Toc]    [Back]

     Upon successful completion, the  function  getsid()  returns
the session ID
     of  the  specified process; otherwise, it returns a value of
-1 and sets
     errno to indicate an error.

ERRORS    [Toc]    [Back]

     getsid() will succeed unless:

     [EPERM]       The current process and the  process  pid  are
not in the same
                   session.

     [ESRCH]       There is no process with a process ID equal to
pid.

SEE ALSO    [Toc]    [Back]

      
      
     getpgid(2), getpgrp(2), setpgid(2), setsid(2), termios(4)

HISTORY    [Toc]    [Back]

     The getsid() function call is derived from its usage in AT&T
System V
     UNIX,  and  is  mandated by X/Open Portability Guide Issue 4
(``XPG4'').

OpenBSD     3.6                         August      19,      1997
[ Back ]
 Similar pages
Name OS Title
getsid Tru64 Retrieves the session ID of a process
setsid OpenBSD create session and set process group ID
pxfsetsid IRIX Creates a new session for a calling process
akill IRIX terminate a process or array session
setsid FreeBSD create session and set process group ID
setsid NetBSD create session and set process group ID
setsid HP-UX create session and set process group ID
setsid Linux creates a session and sets the process group ID
setpgrp3 HP-UX create session and set process group ID; for HP-UX 9.x compatibility.
getpgrp HP-UX get process, process group and parent process ID.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service