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

  man pages->NetBSD man pages -> setsid (2)              
Title
Content
Arch
Section
 

SETSID(2)

Contents


NAME    [Toc]    [Back]

     setsid - create session and set process group ID

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     pid_t
     setsid(void);

DESCRIPTION    [Toc]    [Back]

     The setsid function creates a new session.  The calling process is the
     session leader of the new session, is the process group leader of a new
     process group and has no controlling terminal.  The calling process is
     the only process in either the session or the process group.

     Upon successful completion, the setsid function returns the value of the
     process group ID of the new process group, which is the same as the process
 ID of the calling process.

ERRORS    [Toc]    [Back]

     If an error occurs, setsid returns -1 and the global variable errno is
     set to indicate the error, as follows:

     [EPERM]            The calling process is already a process group leader,
                        or the process group ID of a process other than the
                        calling process matches the process ID of the calling
                        process.

SEE ALSO    [Toc]    [Back]

      
      
     setpgid(2), tcgetpgrp(3), tcsetpgrp(3)

STANDARDS    [Toc]    [Back]

     The setsid function conforms to ISO/IEC 9945-1:1990 (``POSIX.1'').

BSD                              June 4, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
setpgrp3 HP-UX create session and set process group ID; for HP-UX 9.x compatibility.
setsid Linux creates a session and sets the process group ID
sproc IRIX create a new share group process
nsg_attach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
nsg_detach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
gsignal FreeBSD post signal to a process or process group
psignal FreeBSD post signal to a process or process group
pfind OpenBSD find process / process group by number
pgfind OpenBSD find process / process group by number
pgsignal FreeBSD post signal to a process or process group
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service