Don't add signal handlers when daemonized. fix #1346