Today at 3:50pm, Sidd Jashnani expounded:
++
++ Hey,
++ I have a C++ program. How do I make a daemon application out of that?
It really depends what you want to do:
W. Richard Stevens, "Advanced Unix Programming", p. 418, suggests having a
function called daemon_init():
In psuedocode, it is:
fork().
Parent exit()s.
Child calls setsid(), chdir("/"), umask(0). (You should also close file
descriptors that you don't need, e.g. stdin, stdout, stderr.)
(I imagine you had a more specific purpose in mind.)
-Paul
--
God made machine language; all the rest is the work of man.
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]