Daemon

Hi!
I'm new to programming in Linux, and new to the Linux OS. I've been assigned to write a program in C++ in Linux that is going to collect data (via a socket) from another computer at a certain time every morning (4 am). The program needs to be running all the time on a server. What I understand I have to write a daemon. I've now come across both the word daemon and demon -are they the same thing? If not what is the difference and which one should I concentrate on?
Do you/anyone know of any good tutorials on the net or any good books about this subject?

Thankful for help!
/Marie

Comments

  • : Hi!
    : I'm new to programming in Linux, and new to the Linux OS. I've been assigned to write a program in C++ in Linux that is going to collect data (via a socket) from another computer at a certain time every morning (4 am). The program needs to be running all the time on a server. What I understand I have to write a daemon. I've now come across both the word daemon and demon -are they the same thing? If not what is the difference and which one should I concentrate on?
    : Do you/anyone know of any good tutorials on the net or any good books about this subject?
    :
    : Thankful for help!
    : /Marie
    :

    Hi Marie,
    try this link:
    http://www.programmersheaven.com/zone23/cat332/17774.htm
    It's just a skeleton, but it should be fairly easy to figure out.

    -Jalle
  • hi ,
    please read the man page for the system call daemon
    man 3 daemon


    The daemon system call basically removes the program from the tty on which the user is working . I has as far as i know 2 paramaters
    int nochdir and int noclose

    unless nochdir is greater than zero the call changes the working directory to /

    noclose changes the output to /dev/null

    if u need more help feel free to contact me at abhijeet.sane@gmail.com


    regards
    abhijeet sane
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories