Skip to content
irvinlimPublic

About

Like httpbin, but for UNIX signals

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

signalbin

license docker pulls image size

Like httpbin, but for UNIX signals.

signalbin is a small utility written in Go to test interactions with signal handlers.

Installation

Via go install

go install github.com/irvinlim/signalbin@latest

Via Docker image

docker run --rm -it irvinlim/signalbin SIGINT,SIGTERM -sq -t=30s

Usage

This utility traps on a list of signals to aid with testing of signal handling routines.

Usage:
  signalbin SIGNALS [flags]

Examples:
  # Trap on SIGINT and SIGTERM and sleep for 10s after signal
  signalbin SIGINT SIGTERM

  # Trap on SIGINT and sleep for 60s
  signalbin -t 60s

  # Interrupt graceful termination sleep on second signal onwards
  signalbin -t 60s --second-signal-quit

Flags:
  -e, --exit-code int        Specify an explicit exit code to use when exiting.
  -h, --help                 help for signalbin
  -q, --second-signal-quit   Whether to immediately quit graceful termination on the second signal.
  -s, --signal-exit-code     If true, will propagate the signal via the exit code using 128+signalnum.
  -t, --timeout duration     Time to sleep for graceful termination. (default 10s)

License

MIT

About

Like httpbin, but for UNIX signals

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages