summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-12-24 09:30:56 +0000
committerJeremy Allison <jra@samba.org>1997-12-24 09:30:56 +0000
commitaef2c5d69956c72f8b0bd2285283e8879ed8603d (patch)
tree79a4cd35313d1f4a88a067a0c004b27a13ebaa24 /source3/smbd
parent5cdb60bd93fcf97fa9ee1c42642237eb7d4c2083 (diff)
downloadsamba-aef2c5d69956c72f8b0bd2285283e8879ed8603d.tar.gz
samba-aef2c5d69956c72f8b0bd2285283e8879ed8603d.tar.bz2
samba-aef2c5d69956c72f8b0bd2285283e8879ed8603d.zip
Added SIGUSR1/SIGUSR2 handling.
Sending nmbd/smbd a SIGUSR1 will raise the debug level by one (capped at 10) sending a SIGUSR2 will lower it (lower limit at zero). Jeremy. (This used to be commit 6a3cb6f4b46129e4d799a24d34cdb9460ed8910f)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 5e5f129959..5eb360bbe7 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -5243,7 +5243,18 @@ static void usage(char *pname)
#ifndef NO_SIGNAL_TEST
signal(SIGHUP,SIGNAL_CAST sig_hup);
#endif
-
+
+ /* Setup the signals that allow the debug log level
+ to by dynamically changed. */
+
+#if defined(SIGUSR1)
+ signal( SIGUSR1, SIGNAL_CAST sig_usr1 );
+#endif /* SIGUSR1 */
+
+#if defined(SIGUSR2)
+ signal( SIGUSR2, SIGNAL_CAST sig_usr2 );
+#endif /* SIGUSR2 */
+
DEBUG(3,("%s loaded services\n",timestring()));
if (!is_daemon && !is_a_socket(0))