6 1. The first thing to do is call fork() and have the parent exit
7 2. Call setsid() to create a new session
8 3. Change the current working directory to the root directory, or
9 to some specific location
10 4. Set the file mode creation mask to 0 (this will reset the mask,
11 which could be inhereted)
12 5. Unneded file descriptors should be closed