LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-01-2006, 08:50 AM   #1
naf
Member
 
Registered: Oct 2005
Location: Chicago, USA
Distribution: Slackware & Fedora
Posts: 66

Rep: Reputation: 15
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
 
Old 03-01-2006, 11:08 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You might want to look into something like inotify:
http://www-128.ibm.com/developerwork...l-inotify.html
 
Old 03-01-2006, 11:16 AM   #3
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UART Polling/Interrupt jdhar Linux - Software 1 06-10-2010 02:55 PM
Proper way of polling a device george_mercury Programming 4 12-13-2008 01:13 PM
Mouse polling rates Diminished7th Linux - Hardware 2 05-11-2005 06:08 PM
about device polling wangjinyi Fedora 0 04-27-2005 02:22 AM
how to do socket polling in kernel? lylai Linux - Networking 2 06-05-2002 05:52 AM


All times are GMT -5. The time now is 03:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration