fork() and setsid() in daemon mode

In daemon mode, fork and setsid process would be preferred.