Return the exit code of a program as the exit code of setsid when the program exits

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>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

setsid --wait {{program}}

click the source code to copy install setsid on any operating system with command-not-found.com