Bug 180012 - inotify events should be selec()-able
Summary: inotify events should be selec()-able
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: x86_64 Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-04 17:31 UTC by John Ellson
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-05 16:41:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 17:31 UTC, John Ellson
no flags Details

Description John Ellson 2006-02-04 17:31:38 UTC
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):
kernel-2.6.15-1.1907_FC5
glibc-2.3.90-35

How reproducible:


Steps to Reproduce:
1.See test prog.
2.
3.
  
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 17:31:38 UTC
Created attachment 124174 [details]
small test program for inotify + select()

Comment 2 Robert Love 2006-02-05 16:29:22 UTC
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

s/select\(1/select\(fd+1/g

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


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