Balazs Scheidler writes:
I've checked it out by then, and it did close the file source, but after reinitializing the configuration. It works on Linux, but doesn't on NetBSD as it seems.
On NetBSD, it appears that only one process is allowed to open /dev/klog at a time. So syslog-ng gets a "device busy" error when reinitializing, since it still has the file open under a different (though soon to be closed) fd. That's also why it worked fine with regular files when I was testing earlier: they didn't care if they were opened twice.
I patched my tree on my notebook to close the fd earlier, but I forgot to include it in 1.5.14. Here's the patch: [...]
you'll need scsh to rebuild the sources.
I installed scsh-0.6.0 (and scheme48-0.57 just to be on the safe side, though I don't think that was necessary), but I'm having problems trying to regenerate affile.c.x. make_class uses some unusual #! escapes which don't behave under NetBSD, so I tried using "scsh -s make_class", but that didn't work for me either: $ pwd /usr/local/src/syslog-ng-1.5.14/src $ cp /pkg/libol-0.3.1/bin/make_class . $ scsh -s ./make_class < affile.c > affile.c.x Warning: use of macro doesn't match definition (syntax-rules '() ((let-and (expr) clause clauses ...) (and expr (let-and clause clauses ...))) ((let-and (name expr) clause clauses ...) (let ((name expr)) (and name (let-and clause clauses ...)))) ((let-and expr) expr)) Error: attempt to call a non-procedure ('syntax-error '(#{Name let-and} ((pair? expr)) (op-matches (match # #)) (arg-matches (match # #)) (append op-matches arg-matches)) '#{Procedure 2489 (unnamed in make-name-generator in names)} '#{Procedure 2486 (unnamed in make-keyword-comparator in names)}) -------------- BTW, here's what happens with make class: $ uname -s -r NetBSD 1.5.2 $ head /usr/local/bin/make_class #! \ -e main -s !# ;; Reads a C source file on stdin. Comments of the form ;; ;; /* ;; CLASS: ;; expression ;; */ $ /usr/local/bin/make_class bash: /usr/local/bin/make_class: No such file or directory