I\'ve been looking at creating Unix dæmons, and there seem to be two methods. The long-winded one, which seems to come up when searching is to call fork(),
fork()
Note that daemon is not conforming to any standard. Better use standard conforming functions (like POSIX-defined fork and setsid).
daemon
fork
setsid