Skip to content

fix: respond to SIGTERM/SIGINT in default init script#519

Open
delaidam wants to merge 1 commit into
coder:mainfrom
delaidam:fix/default-init-signal-handling
Open

fix: respond to SIGTERM/SIGINT in default init script#519
delaidam wants to merge 1 commit into
coder:mainfrom
delaidam:fix/default-init-signal-handling

Conversation

@delaidam

@delaidam delaidam commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • update the default init script to trap SIGTERM and SIGINT
  • keep the shell as PID 1 while running sleep infinity as a child process
  • document PID 1 signal handling behavior for custom init scripts
  • add an integration test covering SIGTERM and SIGINT shutdown behavior

Fixes #467

Test Plan

  • go build ./...
  • go vet ./...
  • go test ./options/...
  • git diff --check
  • golangci-lint run --timeout=10m
  • go test $(go list ./... | grep -v '/integration')
  • make test-registry
  • go test -count=1 -v ./integration/... -run TestDefaultInitScriptRespondsToSignals

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.

Default sleep infinity doesn't respond to interrupts

1 participant