Expand description
START_* variables that tell a launched command which execution it belongs
to (issue #230). Every backend exports the same three variables, next to
the kill-recovery START_COMMAND_RECOVERY_ATTEMPT:
- START_EXECUTION_ID: the execution UUID (
--session-id) - START_SESSION_NAME: the isolation session/container name (
--session); empty for direct runs, which have no session - START_ATTEMPT: 1 for the first run, n for the n-th attempt (
--resume, kill recovery or--append-attempt), the same number--statusshows
Constants§
Functions§
- build_
execution_ env - Build the START_* variables for one attempt.
- build_
execution_ env_ export - POSIX
exportstatement for the variables, without a trailing separator. - execution_
env_ assignments KEY=valueassignments, e.g. fordocker run -e.- execution_
env_ from_ options - Variables of an isolated launch: its execution UUID, the session or container name and the attempt number.
- inherited_
attempt START_ATTEMPTinherited by a nested level, when it is a positive number.- is_
nested_ launch_ of - True when this process was itself started by execution
execution_id, i.e. it is the next level of a stacked isolation that passes--session-iddown. - prefix_
with_ execution_ env - Prefix a shell command with the export statement. Used by the backends
whose command runs through a shell that does not inherit our environment:
a running tmux server, ssh, and
sudo(which resets the environment).
Type Aliases§
- Execution
Env - Variables of one attempt, in a stable order; empty without an execution id.