mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 01:05:14 +02:00
- djm@cvs.openbsd.org 2012/04/11 13:26:40
[sshd.c] don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a while; ok deraadt@ markus@
This commit is contained in:
parent
9fed161e67
commit
a116d13c4d
@ -25,6 +25,10 @@
|
|||||||
[auth.c]
|
[auth.c]
|
||||||
Support "none" as an argument for AuthorizedPrincipalsFile to indicate
|
Support "none" as an argument for AuthorizedPrincipalsFile to indicate
|
||||||
no file should be read.
|
no file should be read.
|
||||||
|
- djm@cvs.openbsd.org 2012/04/11 13:26:40
|
||||||
|
[sshd.c]
|
||||||
|
don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a
|
||||||
|
while; ok deraadt@ markus@
|
||||||
|
|
||||||
20120420
|
20120420
|
||||||
- (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
|
- (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
|
||||||
|
7
sshd.c
7
sshd.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sshd.c,v 1.388 2011/09/30 21:22:49 djm Exp $ */
|
/* $OpenBSD: sshd.c,v 1.389 2012/04/11 13:26:40 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -1174,7 +1174,10 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
|
|||||||
if (*newsock < 0) {
|
if (*newsock < 0) {
|
||||||
if (errno != EINTR && errno != EAGAIN &&
|
if (errno != EINTR && errno != EAGAIN &&
|
||||||
errno != EWOULDBLOCK)
|
errno != EWOULDBLOCK)
|
||||||
error("accept: %.100s", strerror(errno));
|
error("accept: %.100s",
|
||||||
|
strerror(errno));
|
||||||
|
if (errno == EMFILE || errno == ENFILE)
|
||||||
|
usleep(100 * 1000);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (unset_nonblock(*newsock) == -1) {
|
if (unset_nonblock(*newsock) == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user