Question : C++ deamon creation

I have a program that I want run as a deamon.  I believe I would use the fork() function, but I have no idea as to how I would do this.

Answer : C++ deamon creation

http://www.yendor.com/programming/unix/apue/lib.svr4/daemoninit.c

this is the code that i was talking about ..
Random Solutions  
 
programming4us programming4us