nmbd.c, server.c: Added #ifndef MEM_MAN around code that sets the SIGUSR1
authorJeremy Allison <jra@samba.org>
Fri, 23 Jan 1998 05:22:19 +0000 (05:22 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 23 Jan 1998 05:22:19 +0000 (05:22 +0000)
and SIGUSR2 signals. This allows the MEM_MAN code to be compiled in and
the memory debug feature to be used with SIGUSR1.
Jeremy.

source/nmbd/nmbd.c
source/smbd/server.c

index 4497e0b15d0b30798bcf45870f2ebcefc5c50830..b6e4244cd01815a58259bda196fc4c99baba4ba4 100644 (file)
@@ -580,6 +580,9 @@ int main(int argc,char *argv[])
   /* Setup the signals that allow the debug log level
      to by dynamically changed. */
 
+  /* If we are using the malloc debug code we can't use
+     SIGUSR1 and SIGUSR2 to do debug level changes. */
+#ifndef MEM_MAN
 #if defined(SIGUSR1)
   signal( SIGUSR1, SIGNAL_CAST sig_usr1 );
 #endif /* SIGUSR1 */
@@ -587,6 +590,7 @@ int main(int argc,char *argv[])
 #if defined(SIGUSR2)
   signal( SIGUSR2, SIGNAL_CAST sig_usr2 );
 #endif /* SIGUSR2 */
+#endif /* MEM_MAN */
 
   while((opt = getopt(argc, argv, "as:T:I:C:bAi:B:N:Rn:l:d:Dp:hSH:G:f:")) != EOF)
     {
index 447a9a5469e8460f0e642abd2f92fd2a199095f3..01d379ebb33cfff0b6f50085bd0c0be68a266ccb 100644 (file)
@@ -5314,6 +5314,10 @@ static void usage(char *pname)
   /* Setup the signals that allow the debug log level
      to by dynamically changed. */
  
+  /* If we are using the malloc debug code we can't use
+     SIGUSR1 and SIGUSR2 to do debug level changes. */
+
+#ifndef MEM_MAN
 #if defined(SIGUSR1)
   signal( SIGUSR1, SIGNAL_CAST sig_usr1 );
 #endif /* SIGUSR1 */
@@ -5321,6 +5325,7 @@ static void usage(char *pname)
 #if defined(SIGUSR2)
   signal( SIGUSR2, SIGNAL_CAST sig_usr2 );
 #endif /* SIGUSR2 */
+#endif /* MEM_MAN */
 
   DEBUG(3,("%s loaded services\n",timestring()));