What
A plugin can start a separate program, called a process. Starting one now accepts two new options:
terminallends the session's terminal to the program, so it can take over the screen. If the session has no terminal, it fails with "this session has no terminal to hand over".sandboxruns the program inside the sandbox, the walled-off area that limits what commands can read and write.
How the options are handled:
- Both are passed on with the existing
stdinandtimeoutMsoptions. Before, onlystdinandtimeoutMswere passed on.terminalis passed only when it is present and set, andsandboxonly when it is set. - Both must be
trueor left out. Any other value is rejected with "init. is true or left out". terminalcannot be combined withstdinorsandbox. The error reads "init.terminal goes with neither init.stdin nor init.sandbox".- The check on
timeoutMsmoved into a shared helper. - Programs launched this way are stopped with SIGHUP, the signal a program gets when its terminal closes.
Why
Plugins can now run interactive programs that need the whole terminal, such as an editor, or keep a program they start inside the sandbox. A plugin cannot ask for the terminal and the sandbox at the same time.