On Tue, 22 Dec 1998, Jin Hui wrote:


> Anyone can give me some ideas about how to write a program 
> (C/C++) in Linux
> which can runs in the background after logoff. Thanks!

ok, the only way (as far as I know) is to have a daemon process 
wich run in background.
I can't explain you the hole thing here but, some times ago, i had 
to do a c program (under Linux) for my  home work. The server i 
wrote was a daemon so i wrote a function that do the job.
You'll find this function as attachment. If you want to use it in your 
own stuff, just include the 'daemon.h' file in your main file and call 
the function when you'll need.
if you want to know more about this subject, I have put 2 
references as comment in the files.
Hope i have helped and good luck

Gregoire Welraeds
[EMAIL PROTECTED] 

daemon.zip


Grégoire Welraeds
[EMAIL PROTECTED]

Reply via email to