diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2014-01-14 22:05:33 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2014-01-14 22:05:33 +0000 |
commit | e852d6bc48ee32f3d7df323ab08f811a6fc34c54 (patch) | |
tree | 83b3c88ff66f10f23baf3d2e98383b8c767940f5 /lib/libc/resolv | |
parent | 6103bae6ae61279f360d46ab25b8531b58448467 (diff) | |
download | src-e852d6bc48ee32f3d7df323ab08f811a6fc34c54.tar.gz src-e852d6bc48ee32f3d7df323ab08f811a6fc34c54.zip |
libc/resolv: Use poll() instead of kqueue().
The resolver in libc creates a kqueue for watching a single file descriptor.
This can be done using poll() which should be lighter on the kernel and
reduce possible problems with rlimits (file descriptors, kqueues).
Reviewed by: jhb
Notes
Notes:
svn path=/head/; revision=260652
Diffstat (limited to 'lib/libc/resolv')
-rw-r--r-- | lib/libc/resolv/res_send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c index 4896fe8cb36d..f7c38c51a31f 100644 --- a/lib/libc/resolv/res_send.c +++ b/lib/libc/resolv/res_send.c @@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$"); */ #include "port_before.h" -#ifndef USE_KQUEUE +#if !defined(USE_KQUEUE) && !defined(USE_POLL) #include "fd_setsize.h" #endif @@ -963,7 +963,7 @@ send_dg(res_state statp, timeout.tv_nsec/1000000; pollfd.fd = s; pollfd.events = POLLRDNORM; - n = poll(&pollfd, 1, polltimeout); + n = _poll(&pollfd, 1, polltimeout); #endif /* USE_POLL */ if (n == 0) { |