Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 180012 - inotify events should be selec()-able
inotify events should be selec()-able
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-02-04 12:31 EST by John Ellson
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-05 11:41:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
small test program for inotify + select() (3.16 KB, text/plain)
2006-02-04 12:31 EST, John Ellson
no flags Details

  None (edit)
Description John Ellson 2006-02-04 12:31:38 EST
Description of problem:
/usr/share/doc/kernel-doc-2.6.15/Documentation/filesystems/inotify.txt states:
"Each inotify instance fd is also select()- and poll()-able."

I may be missing some setup, but I can't get select to wakeup from an inotify
event.   inotify (with headers from latest glibc) seems to work ok otherwise.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.See test prog.
Actual results:
select always timesout, even if there were inotify events.

Expected results:
select should wake up for inotify events.

Additional info:
Comment 1 John Ellson 2006-02-04 12:31:38 EST
Created attachment 124174 [details]
small test program for inotify + select()
Comment 2 Robert Love 2006-02-05 11:29:22 EST
First pass: The first parameter to select() is the highest numbered file
descriptor, plus one, not the number of file descriptors watched.

Thus, in your test program, you want to do

Comment 3 John Ellson 2006-02-05 11:39:37 EST
Thank you.  That fixed it.  

Note You need to log in before you can comment on or make changes to this bug.