Date: Sun, 14 Sep 1997 02:44:35 -0700 (PDT) From: Peter Wemm <peter@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 Message-ID: <199709140944.CAA18300@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709140944.CAA18300>