I asked this question before reading about sessions and process groups. I was asking what happened, if you were coding up a daemon, and you fork()'d and exited twice on a system that did not exhibit the sys V behaviour. On a sys V system you are supposed to fork() twice, and have the parent exit each time, so that the second child is not a session leader and thus doesn't acquire a controlling terminal. As far as i can tell it doesn't make any difference if you fork() and exit twice on a system that doesn't have the sys V behaviour. Please correct me if i'm wrong!
Thankx