Skip to content

Preserve signal information in jumpstarter-exec Exit protocol #926

Description

@mangelajo

Summary

When a child process is killed by a signal, jumpstarter-exec currently reports exit code 1, which is indistinguishable from a normal failure. Callers cannot tell "SIGTERM during shutdown" from "command failed".

Deferred from PR #910 because the QEMU driver only branches on zero vs non-zero today.

Background

From PR #910:

We can extend the protocol with signal field in Exit and map to 128+signum in a follow-up if needed.

Original review: signal-killed children reported as exit 1.

Proposed approach

  1. Extend ServerMessage::Exit with something like signal: Option<i32> (populated via ExitStatusExt::signal())
  2. Map client-side reported status to 128 + signum when signal-terminated (shell convention), or expose signal explicitly to Python callers
  3. Update protocol tests and any QEMU driver consumers that should distinguish shutdown vs failure

Acceptance criteria

  • Protocol carries signal information for signal-terminated children
  • Client reports a distinguishable status (e.g. 128+signum) or exposes signal
  • Tests cover signal-terminated vs normal non-zero exit
  • Document the behavior for driver authors

Tracking

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jiraTracked in PITCREW Jira

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions