run, daemonize, write pids