Forrest logo
back to the setsid tool

setsid:tldr:37564

setsid: Return the exit code of a program as the exit code of setsid when the program exits.
$ setsid --wait ${program}
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the setsid tool