Date: Sun, 14 Sep 1997 17:32:28 -0700 From: Paul Traina <pst@shockwave.com> To: Peter Wemm <peter@FreeBSD.ORG> Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/net res_send.c Message-ID: <199709150032.RAA12560@precipice.shockwave.com> In-Reply-To: Your message of "Sun, 14 Sep 1997 02:44:35 PDT." <199709140944.CAA18300@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, this was a good thing to do (tm).
Overkill away. :-)
From: Peter Wemm <peter@FreeBSD.ORG>
Subject: cvs commit: src/lib/libc/net res_send.c
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?199709150032.RAA12560>
