Warning

This is the documentation for a development version of flagman.

Documentation for the Most Recent Stable Version

Overlapping Signals

flagman attempts to handle overlapping signals in an intelligent manner. A signal is “overlapping” if it arrives while actions for previously-arrived signals are still running.

flagman handles overlapping signals of the same identity by coalescing and of different identities by handling them serially but in a non-guaranteed order.

For example, take the following sequence of events.

  1. flagman is sleeping awaiting a signal to arrive
  2. SIGUSR1 arrives
  3. a long-running action for SIGUSR1 starts
  4. SIGUSR2 arrives
  5. the long-running action for SIGUSR1 finishes
  6. a long-running action for SIGUSR2 starts
  7. SIGUSR1 arrives
  8. SIGUSR2 arrives; it is ignored since the SIGUSR2 actions are currently running
  9. SIGHUP arrives
  10. the long-running action for SIGUSR2 finishes
  11. a short-running action for SIGUSR2 starts and finishes
  12. a short-running action for SIGHUP starts and finishes; note that SIGHUP arrived after the most recent SIGUSR1– only intra-signal action ordering is guaranteed
  13. a long-running action for SIGUSR1 starts
  14. the long-running action for SIGUSR1 finishes
  15. flagman returns to sleep until the next handled signal arrives