Skip to content

pitchfork wait

  • Usage: pitchfork wait [--group <GROUP>] [--kill] [ID]…
  • Aliases: w
  • Effect: read-only

Wait for one or more daemons to stop, tailing the logs along the way

Blocks until every specified daemon stops running, while displaying its log output in real-time. Already-finished daemons are evaluated without waiting; their exit codes still count. With no daemon IDs and no --group, shows an interactive picker of the currently running daemons.

With --kill, an incoming signal (SIGINT/SIGTERM/SIGHUP/SIGQUIT, or Ctrl-C on Windows) first stops the waited daemons via the supervisor (graceful SIGTERM then SIGKILL, hooks fire, reverse dependency order), then the command exits with 128 + the signal number like the shell, so Ctrl-C yields 130.

Exit code: 0 when every waited daemon stopped cleanly. Otherwise the exit code of the first failing daemon (in the order given) is propagated; unknown exit codes, failed daemons, and missing statuses map to 1.

Useful in scripts that need to wait for daemons to complete.

Examples:

pitchfork wait api              Wait for 'api' to stop, exit with its status
pitchfork wait api worker       Wait for 'api' and 'worker' to stop
pitchfork wait --group backend  Wait for the whole 'backend' group
pitchfork wait --kill api       Stop 'api' gracefully when a signal arrives
pitchfork w api                 Alias for 'wait'
pitchfork wait api && echo done Run command after the daemon stops

Arguments

  • [ID]… — The name of the daemon(s) to wait for

Flags

  • --group <GROUP> — Wait for all daemons in the named group
  • --kill — Stop the waited daemons when a signal is received while waiting
  • -h --help — Print help
MIT LicenseCopyright © 2026jdx.dev