From owner-cvs-lib Sun Sep 14 02:48:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA03090 for cvs-lib-outgoing; Sun, 14 Sep 1997 02:48:49 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA03050; Sun, 14 Sep 1997 02:47:55 -0700 (PDT) From: Peter Wemm Received: (from peter@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id CAA18300; Sun, 14 Sep 1997 02:44:35 -0700 (PDT) Date: Sun, 14 Sep 1997 02:44:35 -0700 (PDT) Message-Id: <199709140944.CAA18300@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: cvs commit: src/lib/libc/net res_send.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 1997/09/14 02:44:35 PDT Modified files: lib/libc/net res_send.c Log: Call poll(2) from within the resolver but adapt to older kernels without it if necessary. This removes the need to malloc large fd_set's for selecting on high fd's (larger than FD_SETSIZE at libc compile time). The syscall adaptive stuff only happens on the very first call. SIGSYS is masked, and if the call to poll fails with ENOSYS, then we use select for the life of the program. If poll does not fail with ENOSYS, then we always use poll and skip the once-off signal masking gunk. This may be overkill, but it saved my neck a few times while working on multiple different sets of kernel sources, some with poll, some without. Revision Changes Path 1.19 +68 -26 src/lib/libc/net/res_send.c