Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-02-2010, 06:36 PM   #1
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).


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 06:09 AM
Question on select behaviour exman Programming 1 08-30-2006 12:13 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
MySQL Select Count Question robgo777 Programming 9 01-07-2005 05:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 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
Open Source Consulting | Domain Registration