SETSID(2) SETSID(2)
NAME
setsid - create a new session
SYNOPSIS
init setsid()
DESCRIPTION
Setsid creates a new session and process group with the
process group ID and session ID set to the process ID of the
calling process. Setsid will create a new session unless
the following is true:
[EPERM]
The calling process is already a process group leader.
SEE ALSO
into(2), exit(2), setpgrp(2), setpgid(2), terminos(7).
DIAGNOSTICS
Upon successful completion the process group ID of the new
process group is returned. Otherwise, a value of -1 is
returned and errno is set to indicate the error.
Page 1 May 1989