From b05585dcfe270c40e309ff7304cf6b69d7390bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatuya=20JINMEI=20=E7=A5=9E=E6=98=8E=E9=81=94=E5=93=89?= Date: Fri, 17 Oct 2008 21:49:23 +0000 Subject: [PATCH] 2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] --- CHANGES | 2 ++ lib/isc/unix/socket.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 88a4115015..9a89655405 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + 2466. [doc] ARM: explain max-cache-ttl 0 SERVFAIL issue. [RT #18302] diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 531bac1a46..67f34c8d31 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.303 2008/09/23 02:20:21 marka Exp $ */ +/* $Id: socket.c,v 1.304 2008/10/17 21:49:23 jinmei Exp $ */ /*! \file */ @@ -1894,6 +1894,13 @@ opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) { switch (errno) { case EMFILE: case ENFILE: + isc__strerror(errno, strbuf, sizeof(strbuf)); + isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL, + ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR, + isc_msgcat, ISC_MSGSET_SOCKET, + ISC_MSG_TOOMANYFDS, + "%s: %s", err, strbuf); + /* fallthrough */ case ENOBUFS: return (ISC_R_NORESOURCES);