Subject: bin/12085: syslogd polls wrong fd's for inet after lines added/removed from syslogd.conf and -HUP'ed
To: None <gnats-bugs@gnats.netbsd.org>
From: None <olson@geocast.com>
List: netbsd-bugs
Date: 01/30/2001 17:24:21
>Number:         12085
>Category:       bin
>Synopsis:       syslogd polls wrong fd's for inet after lines added/removed from syslogd.conf and -HUP'ed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 30 17:27:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dave Olson
>Release:        1.4, with some 1.5 utilities and changes
>Organization:
Geocast Network Systems
>Environment:
NetBSD anchor.sfo.geocast.com 1.4P NetBSD 1.4P (GEO_STANDARD) #1: Fri Jan 26 12:19:50 PST 2001     olson@anchor.sfo.geocast.com:/home/olson/work/nb/usr/src/sys/arch/i386/compile/GEO_STANDARD i386

>Description:
The changes made in syslogd.c rev 1.39 vs 1.37 result in nfinetix[]
and readfds[] arrays having the wrong fd's after logging files are
added or removed from syslog.conf, because the inet sockets are now
closed and re-opened in init().

The problem is still present in rev 1.42

>How-To-Repeat:
Add a couple of local# facility lines and killall -HUP syslogd
>Fix:
Either revert the fixes in 1.39 and fix them some other fashion, or
add a global variable that's incremented in init() and checked just
prior to the poll() call in the main loop; if set, change the values
in the two arrays to the current finet values, and reset the flag.

The latter fix is simple, safe, and works fine with low overhead,
but isn't particularly elegant.
>Release-Note:
>Audit-Trail:
>Unformatted: