Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 03-12-2006, 12:47 AM   #1
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30

1) When looking throught the select() man page, it has the following in the description:

Those listed in readfds will be watched to see if characters become available for reading (more precisely, to see if a read will not block; in particular, a file descriptor is also ready on end-of-file.
Does the phrase "if a read will not block" mean that reading from that file descriptor wont cause an error? Basically I'm not sure what block means.

2) Also, when I use select to watch a file descriptor, the time structure allows me to... have my program pause during the select() function call, waiting for an fd to become available??? And if one doesn't become available, then the program continues on?
Old 03-12-2006, 01:01 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint, Tribblix
Posts: 9,746

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
1) block means, wait until something is available for reading, can be forever ...

2) the time structure specifies a timeout after which the call returns, whether data is available or not.


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
problem with select() fnoyan Programming 3 12-21-2005 03:17 PM
How to select a motherboard rtcary Linux - Hardware 2 12-14-2005 06:25 PM
select jhon Programming 5 11-01-2005 09:46 PM
Select() did not select my socket thvo Programming 1 05-08-2005 12:20 AM
what os to select kevinasr Linux - Newbie 2 05-18-2003 06:52 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:35 AM.

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