Skip to main content

Module launch

Module launch 

Source
Expand description

Starting the wrapped game shell.

launch renders the integration script into a temporary file, writes the fd-hook launcher into the state directory and runs the player’s shell with the environment documented in the parent module, with inherited stdin, stdout and stderr. It returns when the shell exits; the shell’s own exit status is data, not an error.

§Terminal and signals

The launcher does not touch signals. An interactive bash or fish makes itself the foreground process group of the terminal, so Ctrl-C reaches the game shell and never this process, and hands the terminal back when it exits, exactly as for any nested shell.

Structs§

LaunchOptions
What launch needs to know.

Constants§

FD_LAUNCHER_NAME
File name of the fd-hook launcher inside the state directory.

Functions§

launch
Starts the game shell and waits for it to exit.
launch_with
Like launch, but lets the caller adjust the Command (stdio, extra environment) after the game’s own environment is in place and before the shell starts. Tests use it to run the real launch path without a terminal.
write_fd_launcher
Writes the fd-hook launcher, <dir>/fd-hook.sh, and returns its path.