LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Is there a way of detecting directory changes without polling? (https://www.linuxquestions.org/questions/programming-9/is-there-a-way-of-detecting-directory-changes-without-polling-420610/)

naf 03-01-2006 08:50 AM

Is there a way of detecting directory changes without polling?
 
Is there a way of detecting directory changes without polling? I'm working on an application in C++ that needs to process files that are deposited in a inbound directory. The application is for Fedora Core 4 - Athlon 64 with a filesystem type of ext3.

I don't want to poll the filesystem or continuously read the directory. Is there a way I can determine if the directory via a signal or some kernel message without having to tax the system with continuous stat calls? Thanks.

naf

paulsm4 03-01-2006 11:08 AM

You might want to look into something like inotify:
http://www-128.ibm.com/developerwork...l-inotify.html

95se 03-01-2006 11:16 AM

Check out FAM as well, http://www.linuxmanpages.com/man3/fam.3.php


All times are GMT -5. The time now is 07:50 PM.