![Forrest logo](/images/logo.png)
setsid:tldr:37564
The setsid
command is used to run a program in a new session and detach it from the current terminal session. It provides a way to start a program that continues running even after you close the terminal or log out.
The --wait
option used with setsid
waits for the program to finish executing before exiting. This means that the terminal session will wait until the program completes its execution before allowing any further commands to be executed.
${program}
in this command is a placeholder for the name or path of the program you want to run. You need to replace ${program}
with the actual program you want to execute.
To summarize, when you run the command setsid --wait ${program}
, it creates a new session, executes the specified program within that session, and waits for the program to finish before proceeding.