Skip to content

fix: honor graceful shutdown and release v0.0.3 - #4

Merged
michaelishri merged 1 commit into
mainfrom
fix/graceful-signal-shutdown
Sep 25, 2026
Merged

michaelishri merged 1 commit into
mainfrom
fix/graceful-signal-shutdown

Conversation

@michaelishri

Copy link
Copy Markdown
Owner

SIGTERM/SIGINT previously cancelled exec.CommandContext, immediately killing the directly launched process before graceful shutdown ran. This skipped service cleanup when using exec and could leave a child running when launched through a shell.

Commands now send the configured stop signal to their original process group, wait for the configured timeout, and escalate to SIGKILL for remaining members even after the shell exits. The same lifecycle applies to startup commands and descendants left after normal command exits. Sequential startup waits for shutdown to finish; shutdown status and startup log cleanup now follow that lifecycle.

Adds nine isolated Linux regression cases, updates the shutdown documentation, and adds the v0.0.3 changelog. The existing release workflow will publish the patch release with all four platform binaries and checksums after merge.

Validation:

  • go test ./... -race -cover
  • go vet ./...
  • GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build ./...
  • Isolated before/after SIGTERM probes: both exec and shell-wrapped commands now complete graceful shutdown without surviving children.

@michaelishri
michaelishri merged commit a6720c7 into main Sep 25, 2026
1 check 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.

1 participant