Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net PR/48379: mention kqueue functionality
details: https://anonhg.NetBSD.org/src/rev/9a056c43c021
branches: trunk
changeset: 791342:9a056c43c021
user: christos <christos%NetBSD.org@localhost>
date: Wed Nov 13 23:58:51 2013 +0000
description:
PR/48379: mention kqueue functionality
diffstat:
lib/libc/net/resolver.3 | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r e5bc77beb872 -r 9a056c43c021 lib/libc/net/resolver.3
--- a/lib/libc/net/resolver.3 Wed Nov 13 22:11:52 2013 +0000
+++ b/lib/libc/net/resolver.3 Wed Nov 13 23:58:51 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: resolver.3,v 1.26 2013/05/08 18:18:32 wiz Exp $
+.\" $NetBSD: resolver.3,v 1.27 2013/11/13 23:58:51 christos Exp $
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -33,7 +33,7 @@
.\" @(#)resolver.3 6.5 (Berkeley) 6/23/90
.\" Id: resolver.man3,v 1.2 2009/01/21 00:12:34 each Exp
.\"
-.Dd May 8, 2013
+.Dd November 13, 2013
.Dt RESOLVER 3
.Os
.Sh NAME
@@ -364,6 +364,26 @@
Initialization normally occurs on the first call
to one of the other resolver routines.
.Pp
+In
+.Nx
+the initialization code also sets up a
+.Xr kqueue 2
+and creates a
+.Xr kevent 2
+watching a file descriptor that points to the resolver file.
+Every resolver function, calls the internal function
+.Fn __res_check
+which checks for a new
+.Xr kevent 2
+related to the
+.Xr resolv.conf 5
+file, and reloads the file if necessary.
+This does not work if the file is accessed through a symlink and the symlink
+changes to point to a different file.
+To fix the symlink issue one could add a system call per resolver call to
+get the current time, and reload every so often.
+This is not done currently, but it is under consideration.
+.Pp
The memory referred to by
.Ft statp
must be set to all zeros prior to the first call to
Home |
Main Index |
Thread Index |
Old Index