// Full description of daemon alias daemon = Daemon!( "DaemonizeExample2", KeyValueList!( Signal.Terminate, (logger) { logger.logInfo("Exiting..."); return false; }, Signal.HangUp, (logger) { logger.logInfo("Hello World!"); return true; }, RotateLogSignal, (logger) { logger.logInfo("Rotating log!"); logger.reload; return true; }, DoSomethingSignal, (logger) { logger.logInfo("Doing something..."); return true; } ), (logger, shouldExit) { // some code } ); // Truncated description for client alias daemon = DaemonClient!( "DaemonizeExample2", Signal.Terminate, Signal.HangUp, RotateLogSignal, DoSomethingSignal );
Truncated description of daemon for use with sendSignal function. You need to pass a daemon name and a list of signals to Signals expression list.