fork() and setsid() in daemon mode