Skip to content

fix: stop containers on Ctrl-C and add SIGTERM handler#90

Open
Jaro-c wants to merge 1 commit into
developfrom
fix/signal-handling-orphan-containers
Open

fix: stop containers on Ctrl-C and add SIGTERM handler#90
Jaro-c wants to merge 1 commit into
developfrom
fix/signal-handling-orphan-containers

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • attach_logs now installs a SIGTERM handler (unix) alongside the existing SIGINT handler; either signal exits the select and returns to the caller
  • Up command calls engine.stop() after attach_logs returns so Ctrl-C / SIGTERM triggers a clean container shutdown instead of leaving orphans running

Closes #79

Test plan

  • cargo test passes (444 tests)
  • podup up then Ctrl-C → all containers stop cleanly (no orphans)
  • podup up then kill -TERM <pid> → all containers stop cleanly

Closes #79

- attach_logs now installs a SIGTERM handler (unix) alongside the
  existing SIGINT handler; either signal unblocks the select and
  returns control to the caller
- Up command calls engine.stop() after attach_logs returns so that
  Ctrl-C / SIGTERM triggers a clean container shutdown rather than
  leaving orphans running

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
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.

1 participant