buildDaemon.sendSignalDynamic

As custom signals are mapped to realtime signals at runtime, it is complicated to calculate signal number by hands. The function simplifies sending signals to daemons that were created by the package.

The DaemonInfo could be a full description of desired daemon or simplified one (template ($B DaemonClient). That info is used to remap custom signals to realtime ones.

daemonName is passed as runtime parameter to be able read service name at runtime. signal is the signal that you want to send. pidFilePath is optional parameter that overrides default algorithm of finding pid files (calculated from daemonName in form of '~/.daemonize/<daemonName>.pid').

  1. void sendSignalDynamic(shared IDaemonLogger logger, string daemonName, Signal signal, string pidFilePath = "")
    template buildDaemon(alias DaemonInfo)
    version(linux)
    void
    sendSignalDynamic
    ()
    if (
    isDaemon!DaemonInfo ||
    isDaemonClient!DaemonInfo
    )
  2. void sendSignal(shared IDaemonLogger logger, Signal signal, string pidFilePath = "")

See Also

sendSignal version of the function that takes daemon name from DaemonInfo.

Meta