Skip to content

supervisor=s6: eval command first and don't invoke a shell at run-time - #1053

Merged
navi-desu merged 1 commit into
OpenRC:masterfrom
skarnet:s6.20260727-eval
Jul 27, 2026
Merged

supervisor=s6: eval command first and don't invoke a shell at run-time#1053
navi-desu merged 1 commit into
OpenRC:masterfrom
skarnet:s6.20260727-eval

Conversation

@skarnet

@skarnet skarnet commented Jul 27, 2026

Copy link
Copy Markdown

supervise-daemon uses 'eval' once to evaluate shell constructs in the definition of command, command_args and command_args_foreground. And then it launches $command directly. So it doesn't support deeply nested shell constructs and using a full run-time shell to evaluate $command is unnecessary.
So we do the same when building the run script for s6: we eval at run script build time, and the result invokes $command directly, without going through a shell. This is much cleaner, especially since the rest of the run script is execline i.e. already shell-free.

supervise-daemon uses 'eval' once to evaluate shell constructs in the
definition of command, command_args and command_args_foreground. And
then it launches $command directly. So it doesn't support deeply
nested shell constructs and using a full run-time shell to evaluate
$command is unnecessary.
So we do the same when building the run script for s6: we eval at
run script build time, and the result invokes $command directly,
without going through a shell. This is much cleaner, especially since
the rest of the run script is execline i.e. already shell-free.
@navi-desu
navi-desu merged commit 3bdccbc into OpenRC:master Jul 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants