git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f895fcf
)
r15675: Man pages say never look at the fd_set after a select
author
Jeremy Allison
<jra@samba.org>
Thu, 18 May 2006 01:45:18 +0000
(
01:45
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:17:06 +0000
(11:17 -0500)
if it returned -1 (treat as undefined). Ensure we obey
this.
Jeremy.
(This used to be commit
256ae3a16bcafe70cc1a00496681c709380e4fc3
)
source3/nsswitch/winbindd.c
patch
|
blob
|
history
diff --git
a/source3/nsswitch/winbindd.c
b/source3/nsswitch/winbindd.c
index 06b8b93543744216dfaa3e8938861ba50e95df6f..cc904c3209185b0ecaec84ceaa6ac9d7dc494b1b 100644
(file)
--- a/
source3/nsswitch/winbindd.c
+++ b/
source3/nsswitch/winbindd.c
@@
-769,10
+769,14
@@
static void process_loop(void)
selret = sys_select(maxfd + 1, &r_fds, &w_fds, NULL, &timeout);
- if (selret == 0)
+ if (selret == 0)
{
goto no_fds_ready;
+ }
- if ((selret == -1 && errno != EINTR) || selret == 0) {
+ if (selret == -1) {
+ if (errno == EINTR) {
+ goto no_fds_ready;
+ }
/* Select error, something is badly wrong */
@@
-780,6
+784,8
@@
static void process_loop(void)
exit(1);
}
+ /* selret > 0 */
+
ev = fd_events;
while (ev != NULL) {
struct fd_event *next = ev->next;