C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-19-2009, 08:48 AM   #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
Krsh is offline   Reply With Quote
Old 02-19-2009, 09:12 AM   #2
CSharpener
 
vart's Avatar
 
Join Date: Oct 2006
Posts: 5,331
Have you read this http://msdn.microsoft.com/en-us/libr...61(VS.85).aspx
?
__________________
If I have eight hours for cutting wood, I spend six sharpening my axe.
vart is online now   Reply With Quote
Old 02-20-2009, 12:15 AM   #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.
Krsh is offline   Reply With Quote
Old 02-20-2009, 12:46 AM   #4
CSharpener
 
vart's Avatar
 
Join Date: Oct 2006
Posts: 5,331
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

?
__________________
If I have eight hours for cutting wood, I spend six sharpening my axe.
vart is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 10:43 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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