setsid
Run a program in a new session if the calling process is not a process group leader. The created session is by default not controlled by the current terminal. More information: <https://manned.org/setsid>.
Install
- All systems
-
curl cmd.cat/setsid.sh
- Debian
-
apt-get install util-linux
- Ubuntu
-
apt-get install util-linux
- Alpine
-
apk add util-linux
- Arch Linux
-
pacman -S util-linux
- Kali Linux
-
apt-get install util-linux
- CentOS
-
yum install util-linux
- Fedora
-
dnf install util-linux
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install util-linux
- OS X
-
brew install util-linux
- Raspbian
-
apt-get install util-linux
- Dockerfile
- dockerfile.run/setsid
- Docker
-
docker run cmd.cat/setsid setsid
powered by Commando
Run a program in a new session if the calling process is not a process group leader. The created session is by default not controlled by the current terminal. More information: <https://manned.org/setsid>.
-
Run a program in a new session:
setsid program
-
Run a program in a new session discarding the resulting output and error:
setsid program > /dev/null 2>&1
-
Run a program creating a new process:
setsid --fork program
-
Return the exit code of a program as the exit code of setsid when the program exits:
setsid --wait program
-
Run a program in a new session setting the current terminal as the controlling terminal:
setsid --ctty program
© tl;dr; authors and contributors