Linux "setsid" Command Line Options and Examples
creates a session and sets the process group ID

setsid runs a program in a new session. The command calls fork(2) if already a process group leader. Other‐ wise, it executes a program in the current process.


Usage:

setsid [options] program [arguments]




Command Line Options:

-c
Set the controlling terminal to the current one.
setsid -c ...
-w
Wait for the execution of the program to end, and return the exit value of this program as the returnvalue of setsid.
setsid -w ...
-V
Display version information and exit.
setsid -V ...
-h
Display help text and exit.
setsid -h ...