Warning
This is the documentation for a development version of flagman.
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.
- flagman is sleeping awaiting a signal to arrive
SIGUSR1
arrives- a long-running action for
SIGUSR1
starts SIGUSR2
arrives- the long-running action for
SIGUSR1
finishes - a long-running action for
SIGUSR2
starts SIGUSR1
arrivesSIGUSR2
arrives; it is ignored since theSIGUSR2
actions are currently runningSIGHUP
arrives- the long-running action for
SIGUSR2
finishes - a short-running action for
SIGUSR2
starts and finishes - a short-running action for
SIGHUP
starts and finishes; note thatSIGHUP
arrived after the most recentSIGUSR1
– only intra-signal action ordering is guaranteed - a long-running action for
SIGUSR1
starts - the long-running action for
SIGUSR1
finishes - flagman returns to sleep until the next handled signal arrives