ctlinnd trace nnrpd?
Katsuhiro Kondou
kondou at nec.co.jp
Thu Mar 8 23:06:14 UTC 2001
In article <9891li$frv$2 at krell.zikzak.de>,
Bettina Fink <laura at hydrophil.de> wrote;
} Ehm, one thing: I have no idea how to stop the tracing mode
} again. "ctlinnd trace n n" and "kill -HUP" to the master nnrpd
} doesn't seem to impress it, still full tracing output in the
} logs for new connections.
Try attached which should work. (diff from original code)
--
Katsuhiro Kondou
--- nnrpd/nnrpd.c.orig 2001/03/05 02:11:30
+++ nnrpd/nnrpd.c 2001/03/08 23:04:11
@@ -958,10 +958,18 @@
/* Set signal handle to care for dead children */
(void)xsignal(SIGCHLD, WaitChild);
+
+ /* Arrange to toggle tracing. */
+ (void)xsignal(SIGHUP, ToggleTrace);
TITLEset("nnrpd: accepting connections");
listen(lfd, 128);
+ if (ChangeTrace) {
+ Tracing = Tracing ? FALSE : TRUE;
+ syslog(L_TRACE, "trace %sabled", Tracing ? "en" : "dis");
+ ChangeTrace = FALSE;
+ }
do {
clen = sizeof(csa);
@@ -1001,6 +1009,8 @@
} else {
SetupDaemon();
+ /* Arrange to toggle tracing. */
+ (void)xsignal(SIGHUP, ToggleTrace);
}/* DaemonMode */
/* Setup. */
@@ -1058,9 +1068,6 @@
/* Catch SIGPIPE so that we can exit out of long write loops */
(void)xsignal(SIGPIPE, CatchPipe);
-
- /* Arrange to toggle tracing. */
- (void)xsignal(SIGHUP, ToggleTrace);
/* Get permissions and see if we can talk to this client */
StartConnection();
More information about the inn-workers
mailing list