From owner-cvs-src@FreeBSD.ORG Mon Mar 5 19:39:51 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 920FA16A401; Mon, 5 Mar 2007 19:39:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 6ADE813C48E; Mon, 5 Mar 2007 19:39:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l25JdpMX024825; Mon, 5 Mar 2007 19:39:51 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l25Jdp49024824; Mon, 5 Mar 2007 19:39:51 GMT (envelope-from jhb) Message-Id: <200703051939.l25Jdp49024824@repoman.freebsd.org> From: John Baldwin Date: Mon, 5 Mar 2007 19:39:51 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libc/resolv res_send.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2007 19:39:51 -0000 jhb 2007-03-05 19:39:51 UTC FreeBSD src repository Modified files: lib/libc/resolv res_send.c Log: Only reject file descriptors higher than FD_SETSIZE if we are not using poll(2) or kqueue(2). Previously we rejected fd's higher than FD_SETSIZE for kevent(2), and larger than sysconf(_SC_OPEN_MAX) for poll(2). However, the check for poll(2) wasn't really needed. open(2) and socket(2) won't return an fd you can't pass to either poll(2) or kevent(2). This fixes a but where gethostbyname() would fail if you had more than 1023 files open in a process. MFC after: 1 week Reviewed by: ume Found by: ps Revision Changes Path 1.7 +5 -7 src/lib/libc/resolv/res_send.c