S6-SETSID(8)

NAME
s6-setsid - run a program as a new session leader, or in a new foreground or background process group

SYNOPSIS
s6-setsid [-s | -b | -f | -g] [-i | -I | -q] [-d ctty] prog...

DESCRIPTION
s6-setsid creates a new session, or a new process group, and may make that process group the foreground process group, depending on the options it is run with.

As session leader or process group leader, s6-setsid then executes into prog....

OPTIONS

-s  Session. s6-setsid will try and execute prog as a session leader. This is the default.

-b  Background process group. s6-setsid will not create a new session, but will create a new process group, and try and execute prog as the new process group leader.

-f  Foreground process group. s6-setsid will not create a new session, but will create a new process group and attach its session's controlling terminal to the new process group before executing prog. However, the new process group will likely be stopped, waiting for the former foreground process group to relinquish the controlling terminal, and will need to be sent a SIGCONT to resume. To avoid that, use the next option.

-g  Grab terminal. s6-setsid will not create a new session, but will create a new process group and attach its session's controlling terminal to the new process group before executing prog. It will forcefully grab the controlling terminal from the former foreground process group: a process belonging to that former foreground process group will be stopped if it attempts to read from or write to that terminal.

-i  Strict. If s6-setsid cannot perform the operations it needs, it will exit 111 with an error message.

-I  Loose. If s6-setsid cannot perform the operations, it will print a warning message, but exec into prog nonetheless. This is the default.

-q  Silent. s6-setsid will not print any warning message; it will exec into prog even if it cannot perform the operations.

-d ctty
    Assume file descriptor number ctty is the controlling terminal for the current session. Default is 0. This is only useful when used with the -f or -g options.

SEE ALSO
s6-applyuidgid(8), s6-envdir(8), s6-envuidgid(8), s6-fghack(8), s6-setuidgid(8), s6-softlimit(8), s6-tai64n(8), s6-tai64nlocal(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-setsid.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)