Daemonize *before* spawning children

Getting SIGCHLD works much better that way.

Change-Id: Iabac84dd7d354cc213565ad67ce4a68a0121b115