Skip to content

Add overmind signal command#215

Open
paddor wants to merge 1 commit intoDarthSim:masterfrom
paddor:add-signal-command
Open

Add overmind signal command#215
paddor wants to merge 1 commit intoDarthSim:masterfrom
paddor:add-signal-command

Conversation

@paddor
Copy link

@paddor paddor commented Mar 19, 2026

Summary

  • Adds a new overmind signal <SIGNAL> [process name...] command to send arbitrary signals to named processes (or all if none specified)
  • Supports wildcard matching for process names, consistent with stop and restart
  • Adds HUP to signalMap (was missing, primary use case for config reload)

Usage examples

overmind signal HUP web        # send SIGHUP to "web" process
overmind signal USR1 worker*   # send SIGUSR1 to processes matching "worker*"
overmind signal TERM           # send SIGTERM to all processes

Implementation

Follows the same patterns as stop and restart:

  • cmd_signal.go — CLI handler, validates signal name arg is present, sends command over socket
  • start/command_center.goprocessSignal() parses signal name via signalMap, sends to matched processes
  • start/process.goSignal() method sends signal via groupSignal() without modifying lifecycle flags (pure signal passthrough)
  • start/handler.go — Adds HUP to signalMap
  • main.go — Registers the new command

Test plan

  • go build compiles successfully
  • overmind signal HUP <process> sends SIGHUP to a running process
  • overmind signal USR1 web* sends to wildcard-matched processes
  • overmind signal TERM (no process names) sends to all processes
  • overmind signal INVALID is a silent no-op on the daemon side
  • overmind signal (no args) prints a fatal error

Add a new command to send arbitrary signals to named processes (or all
if none specified), with wildcard matching support. This fills a gap
between `kill` (SIGKILL to all) and `stop` (configurable stop signal):

    overmind signal HUP web        # SIGHUP to "web"
    overmind signal USR1 worker*   # SIGUSR1 to matching processes
    overmind signal TERM           # SIGTERM to all

Also adds HUP to signalMap since it's a primary use case for this
command (config reload).
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