You need to fork a daemon process on a Unix or Unix-like system, which, in turn, requires a certain precise sequence of system calls.