Merge branch 'patch-1' of https://github.com/gjones2/Freeside
[freeside.git] / rt / lib / RT.pm
index 063f7f7..4372a56 100644 (file)
@@ -138,6 +138,8 @@ up logging|/InitLogging>, and L<loads plugins|/InitPlugins>.
 
 sub Init {
 
+    my @arg = @_;
+
     CheckPerlRequirements();
 
     InitPluginPaths();
@@ -146,7 +148,7 @@ sub Init {
     ConnectToDatabase();
     InitSystemObjects();
     InitClasses();
-    InitLogging();
+    InitLogging(@arg);
     InitPlugins();
     RT::I18N->Init;
     RT->Config->PostLoadCheck;
@@ -174,6 +176,8 @@ Create the Logger object and set up signal handlers.
 
 sub InitLogging {
 
+    my %arg = @_;
+
     # We have to set the record separator ($, man perlvar)
     # or Log::Dispatch starts getting
     # really pissy, as some other module we use unsets it.
@@ -309,11 +313,14 @@ sub InitLogging {
                          ));
         }
     }
-    InitSignalHandlers();
+    InitSignalHandlers(%arg);
 }
 
 sub InitSignalHandlers {
 
+    my %arg = @_;
+    return if $arg{'NoSignalHandlers'};
+
 # Signal handlers
 ## This is the default handling of warnings and die'ings in the code
 ## (including other used modules - maybe except for errors catched by