summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r--source/smbd/server.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 53d07fd905c..343a835be8a 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -545,6 +545,10 @@ static BOOL dump_core(void)
DEBUG(0,("Dumping core in %s\n", dname));
+ /* Ensure we don't have a signal handler for abort. */
+#ifdef SIGABRT
+ CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL);
+#endif
abort();
return(True);
}
@@ -845,12 +849,13 @@ void build_options(BOOL screen);
/* Setup the main smbd so that we can get messages. */
claim_connection(NULL,"",0,True,FLAG_MSG_GENERAL|FLAG_MSG_SMBD);
- /*
- DO NOT ENABLE THIS TILL YOU COPE WITH KILLING THESE TASKS AND INETD
- THIS *killed* LOTS OF BUILD FARM MACHINES. IT CREATED HUNDREDS OF
- smbd PROCESSES THAT NEVER DIE
- start_background_queue();
- */
+ /* only start the background queue daemon if we are
+ running as a daemon -- bad things will happen if
+ smbd is launched via inetd and we fork a copy of
+ ourselves here */
+
+ if ( is_daemon )
+ start_background_queue();
if (!open_sockets_smbd(is_daemon, interactive, ports))
exit(1);