SignalManager
class SignalManager
Properties
| protected SignalHandlerInterface[][][] | $handlers | ||
| protected Repository | $config | ||
| protected bool | $stopped | ||
| protected array<int, true> | $waiting | Coroutine IDs currently blocked in a cancellable native signal wait. |
Methods
Initialize the signal handlers from config.
Get all registered signal handlers.
Start listening for signals for the given process type.
Stop listening for signals in this process.
Build the priority queue of signal handler classes from config.
Details
at line 38
__construct(Container $container)
Create a new signal manager instance.
at line 49
void
init()
Initialize the signal handlers from config.
Boot-only. Reinitializing after listening starts leaves existing watchers using the prior handler set until the process exits.
at line 69
array
getHandlers()
Get all registered signal handlers.
at line 80
void
listen(int|null $process)
Start listening for signals for the given process type.
Boot-only. Each call creates another set of process-lifetime watchers that would invoke the configured handlers again for the same signal.
at line 139
void
stop()
Stop listening for signals in this process.
The deregister listener invokes this at worker/process exit. Stopping is terminal and permanently halts signal handling for this process incarnation.
at line 154
protected SplPriorityQueue
getQueue()
Build the priority queue of signal handler classes from config.