Represents a background job in a Bash session.
Each job has:
- A job number (1-based, assigned by Session)
- An OS process ID (from ExCmd)
- Status tracking (running, stopped, done)
Job States
:running- Process is actively executing:stopped- Process has been suspended (SIGSTOP):done- Process has completed (exit code available)
Output
Job output flows through sinks to the session's OutputCollector, not accumulated in the Job struct itself.
Summary
Types
@type status() :: :running | :stopped | :done
@type t() :: %Bash.Job{ command: String.t(), completed_at: DateTime.t() | nil, erlang_pid: pid() | nil, exit_code: integer() | nil, job_number: pos_integer(), os_pid: pos_integer() | nil, started_at: DateTime.t(), status: status() }