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

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

GETSID(2)

Contents


NAME    [Toc]    [Back]

     getsid -- get process session

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

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 getsid() system call 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]

     The getsid() system call will succeed unless:

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

     Note that an implementation may restrict this system call to processes
     within the same session ID as the calling process.

SEE ALSO    [Toc]    [Back]

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

HISTORY    [Toc]    [Back]

     The getsid() system call appeared in FreeBSD 3.0.	The getsid() system
     call is derived from its usage in AT&T System V UNIX.


FreeBSD 5.2.1			August 19, 1997 		 FreeBSD 5.2.1
[ 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