LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2010, 07:36 PM   #1
NvrBst
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
select(2) + TEMP_FAILURE_RETRY Question


I read some select tutorials and had a problem with signals. The sites I read suggested TEMP_FAILURE_RETRY (unistd.h) as a convenient way to adress the problem.

I was then reading the select(2) man pages and it states "On error, -1 is returned, and errno is set appropriately; the sets and timeout become undefined, so do not rely on their contents after an error."

I looked at the implementation of TEMP_FAILURE_RETRY and it just loops, not worrying about reseting the sets. Is this a problem or does the "-1 return with EINTR" not cause problems for fd_sets, only other -1 returns with errno set to something other than EINTR?

Thanks. I'm just a little curious if TEMP_FAILURE_RETRY is safe with select(2) to take care of EINTR's. I hope this is the right place for this question (more so programming on linux hehe).
 
  


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
Question about errorFds in select() Sathya Programming 1 05-21-2008 07:09 AM
Question on select behaviour exman Programming 1 08-30-2006 01:13 PM
another simple question about select() djgerbavore Programming 10 04-15-2006 04:29 PM
question abt select() on FC 3 new user Programming 3 11-14-2005 06:45 AM
MySQL Select Count Question robgo777 Programming 9 01-07-2005 06:54 AM


All times are GMT -5. The time now is 06:12 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration