Adapt to split of event and signal handling in daemonlib
windows: Simplify handling of the running flag in the event loop