Skip to content

Add supervisord integration example - #90

Open
ting-hong-shieh wants to merge 1 commit into
cloudflare:masterfrom
ting-hong-shieh:docs/supervisord-example
Open

Add supervisord integration example#90
ting-hong-shieh wants to merge 1 commit into
cloudflare:masterfrom
ting-hong-shieh:docs/supervisord-example

Conversation

@ting-hong-shieh

Copy link
Copy Markdown

Closes #43.

Summary

  • Add a tableflip-supervisor process proxy that stays attached to supervisord while tableflip replaces the service process.
  • Forward HUP, termination, and user signals to the current PID from tableflip.Options.PIDFile.
  • Exit when the managed process stops without handing off, so supervisord can restart the service.
  • Include a supervisord configuration, build instructions, PID-file permission guidance, and the zero-downtime reload command.
  • Explain why Supervisor's standard pidproxy exits after the first successful tableflip upgrade.

Testing

  • go test ./...
  • go test ./examples/supervisord -run TestProxyTracksReplacementProcess -count=25
  • GOTOOLCHAIN=go1.25.5 go test -race ./...
  • go vet ./...
  • go build ./examples/supervisord
  • Supervisor 4.3.0 end-to-end test: the service PID changed after supervisorctl signal HUP, the proxy PID remained RUNNING, and supervisorctl stop terminated both processes.

@ting-hong-shieh
ting-hong-shieh marked this pull request as ready for review August 13, 2026 11:58
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.

Add an example for supervisord integration

1 participant