Tweaked sub daemonize.