Can we have a daemon process sleeping until a file is created, using C/C++ in window

This is a discussion on Can we have a daemon process sleeping until a file is created, using C/C++ in window within the Windows Programming forums, part of the Platform Specific Boards category; Hi, Can we have a daemon process that sleeps until a file is created( like a blocked file open) and ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    7

    Smile Can we have a daemon process sleeping until a file is created, using C/C++ in window

    Hi,
    Can we have a daemon process that sleeps until a file is created( like a blocked file open) and when the file is created does some job and then deletes the file, sleeps again until the file is created again


    The program can be like

    Code:
    while() //daemon process, indefinite loop
    {
      until the file is created ( sleep )     // this will not be polling, but a blocked mode
    
      <do a job> // now that the file is created 
    
      < delete the file >
    
    }
    I want this for an asynchronous communication between a solaris server and a awindows machine. When a particular event happens Solaris server will create a file and ftp that to the windows machine. The process in the windows machine, on arrival of the file will wake up and do a particular job assciated with that event, delete the file and sleep again


    Thanks in advance

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    7
    Thanks dude.

    This seems to be doable. I am quite new to this windows C++ programming. Can you suggest any book or tutorial. I just require a mediocre knowledge, only for this particular proj.

    Thanks for the help.

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Quote Originally Posted by Krsh View Post
    Thanks dude.

    This seems to be doable. I am quite new to this windows C++ programming. Can you suggest any book or tutorial. I just require a mediocre knowledge, only for this particular proj.

    Thanks for the help.
    Have you already read this
    Windows programming links

    and this

    C++ Book Recommendations

    ?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  4. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM
  5. Invoking MSWord
    By Donn in forum C Programming
    Replies: 21
    Last Post: 09-08-2001, 04:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21