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).