diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-15 03:12:08 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-15 03:12:08 +0000 |
commit | f9452513fcf92be881809006ce3c210805d5f2ad (patch) | |
tree | 7422ff5a747a6183001292786a74b36adc9453b4 /ssh-keyscan.c | |
parent | d8a9021f3652d8ab99d0fed2460420c3eb4e10a2 (diff) |
- deraadt@cvs.openbsd.org 2001/02/12 22:56:09
[clientloop.c packet.c ssh-keyscan.c]
deal with EAGAIN/EINTR selects which were skipped
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 834649fef..5cd368e93 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "includes.h" | 10 | #include "includes.h" |
11 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.15 2001/02/09 09:04:59 itojun Exp $"); | 11 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.16 2001/02/12 22:56:10 deraadt Exp $"); |
12 | 12 | ||
13 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) | 13 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) |
14 | #include <sys/queue.h> | 14 | #include <sys/queue.h> |
@@ -498,7 +498,10 @@ conloop(void) | |||
498 | seltime.tv_sec = seltime.tv_usec = 0; | 498 | seltime.tv_sec = seltime.tv_usec = 0; |
499 | 499 | ||
500 | r = e = read_wait; | 500 | r = e = read_wait; |
501 | select(maxfd, &r, NULL, &e, &seltime); | 501 | while (select(maxfd, &r, NULL, &e, &seltime) == -1 && |
502 | (errno == EAGAIN || errno == EINTR)) | ||
503 | ; | ||
504 | |||
502 | for (i = 0; i < maxfd; i++) | 505 | for (i = 0; i < maxfd; i++) |
503 | if (FD_ISSET(i, &e)) { | 506 | if (FD_ISSET(i, &e)) { |
504 | error("%s: exception!", fdcon[i].c_name); | 507 | error("%s: exception!", fdcon[i].c_name); |