LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-29-2006, 06:20 AM   #1
exman
LQ Newbie
 
Registered: May 2006
Location: Germany, BS
Distribution: Debian Kernel 2.6.15, Kubuntu Dapper
Posts: 24

Rep: Reputation: 15
Question on select behaviour


Hi,
I have some specific hardware here and the driver does not seem to support select calls on the filedescriptor as far as I can see (driver does not contain poll()).
Now if I try to use the descriptor in a select call, it returns without changing the fd_sets but also returns no error.
Is that how it is intended to behave?
Any advise would be appreciated.

exman
 
Old 08-30-2006, 12:13 PM   #2
exman
LQ Newbie
 
Registered: May 2006
Location: Germany, BS
Distribution: Debian Kernel 2.6.15, Kubuntu Dapper
Posts: 24

Original Poster
Rep: Reputation: 15
Ok I found the answer myself.
http://lwn.net/images/pdf/LDD3/ch03.pdf page 10

Quote:
unsigned int (*poll) (struct file *, struct poll_table_struct *);
The poll method is the back end of three system calls: poll, epoll, and select, all of
which are used to query whether a read or write to one or more file descriptors
would block. The poll method should return a bit mask indicating whether non-
blocking reads or writes are possible, and, possibly, provide the kernel with
information that can be used to put the calling process to sleep until I/O
becomes possible. If a driver leaves its poll method NULL, the device is assumed to
be both readable and writable without blocking.
So it seems that the behaviour of select is correct.
exman
 
  


Reply



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
Spamassassin Behaviour Question jonwatson Linux - Newbie 3 06-14-2006 01:48 PM
another simple question about select() djgerbavore Programming 10 04-15-2006 03:29 PM
question abt select() on FC 3 new user Programming 3 11-14-2005 05:45 AM
question about select sys call xatzipol Programming 1 10-30-2005 09:22 AM
MySQL Select Count Question robgo777 Programming 9 01-07-2005 05:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration