PcntlSignals

Helper class for handling linux signals. Installed signals: SIGHUP SIGINT SIGTERM SIGPIPE SIGUSR1
Methods Summary
public static
# create( bool $install = true )
Factory method, can install default signals.
public static
public
# install( array $signals )
Installs selected signal
public
# handle( int $signal , callable $handler , string $namespace = 'default' )
Registers handler for signal in selected namespace.
public
# dispatchSignal( int $signal )
Dispatch signal on registered handlers.
public
# getHandlers( )
Returns all registered handlers.
public
# getHandlersForSignal( $signal , $namespace = NULL )
public
# checkPendingSignals( )
Calls pcntl_signal_dispatch for process pending signals.
public static
Constants Summary
public int SIGHUP
# 1
public int SIGINT
# 2
public int SIGTERM
# 15
public int SIGPIPE
# 13
public int SIGUSR1
# 10
public string DEFAULT_NAMESPACE
# 'default'