setsid man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



setsid(2)							     setsid(2)

NAME
     setsid - set session ID

SYNOPSIS
     #include <sys/types.h>
     #include <unistd.h>

     pid_t setsid(void);

DESCRIPTION
     If the calling process is not already a process group leader, setsid sets
     the process group ID and session ID of the calling process to the process
     ID of the calling process, and releases the process's controlling
     terminal.

     setsid will fail and return an error if the following is true:

     EPERM	    The calling process is already a process group leader, or
		    there are processes other than the calling process whose
		    process group ID is equal to the process ID of the calling
		    process.

SEE ALSO
     intro(2), exec(2), exit(2), fork(2), getpid(2), getpgid(2), getsid(2),
     setpgid(2), setpgrp, signal(2), sigsend(2), sigaction(2).

NOTES
     If the calling process is the last member of a pipeline started by a job
     control shell, the shell may make the calling process a process group
     leader.  The other processes of the pipeline become members of that
     process group. In this case, the call to setsid will fail.	 For this
     reason, a process that calls setsid and expects to be part of a pipeline
     should always first fork; the parent should exit and the child should
     call setsid, thereby insuring that the process will work reliably when
     started by both job control shells and non-job control shells.

DIAGNOSTICS
     Upon successful completion, setsid returns the calling process's session
     ID.  Otherwise, a value of -1 is returned and errno is set to indicate
     the error.

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net