+2401. [bug] Expect to get E[MN]FILE errno internal_accept()
+ (from accept() or fcntl() system calls). [RT #18358]
+
2399. [bug] Abort timeout queries to reduce the number of open
UDP sockets. [RT #18367]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.207.2.19.2.35.4.4 2008/07/23 23:47:49 tbox Exp $ */
+/* $Id: socket.c,v 1.207.2.19.2.35.4.5 2008/07/24 10:35:48 fdupont Exp $ */
#include <config.h>
(void)close(fd);
errno = tmp;
fd = new;
- err = "fcntl";
+ err = "accept/fcntl";
}
#endif
if (SOFT_ERROR(errno))
goto soft_error;
switch (errno) {
- case ENOBUFS:
case ENFILE:
+ case EMFILE:
+ isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ isc_msgcat, ISC_MSGSET_SOCKET,
+ ISC_MSG_TOOMANYFDS,
+ "%s: too many open file descriptors",
+ err);
+ goto soft_error;
+
+ case ENOBUFS:
case ENOMEM:
case ECONNRESET:
case ECONNABORTED:
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.5.2.13.2.24.4.5 2008/07/23 23:47:49 tbox Exp $ */
+/* $Id: socket.c,v 1.5.2.13.2.24.4.6 2008/07/24 10:35:48 fdupont Exp $ */
/* This code has been rewritten to take advantage of Windows Sockets
* I/O Completion Ports and Events. I/O Completion Ports is ONLY
(void *)&addrlen);
if (fd == INVALID_SOCKET) {
accept_errno = WSAGetLastError();
- if (SOFT_ERROR(accept_errno) || accept_errno == WSAECONNRESET) {
+ if (accept_errno == WSAEMFILE) {
+ isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ isc_msgcat, ISC_MSGSET_SOCKET,
+ ISC_MSG_TOOMANYFDS,
+ "%s: too many open file descriptors",
+ "accept");
+ goto soft_error;
+ } else if (SOFT_ERROR(accept_errno) ||
+ accept_errno == WSAECONNRESET) {
goto soft_error;
} else {
isc__strerror(accept_errno, strbuf, sizeof(strbuf));