rename ifdo -> whenM and move to top level
check pid liveness before sending sigTERM
Add a killWait field to CreateDaemon to control wait between sending sigTERM and sigKILL