numnum,you are the expert!! but I remember you too has a fork() in deamon programming, what is purpose of the fork()
In daemon programming, why use setsid() to create a new session? if not, what will happen? besides, If one process in a process group without a process leader, what will happen?