]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/filed.c
Fix bug 2141
[bacula/bacula] / bacula / src / filed / filed.c
index 69d5aa95f49b0232acab8e452f5efe63ca54e798..d4e51f8027033a290f4dccf09914a16562ff33c0 100644 (file)
@@ -197,6 +197,11 @@ int main (int argc, char *argv[])
       configfile = bstrdup(CONFIG_FILE);
    }
 
+   if (!foreground) {
+      daemon_start();
+      init_stack_dump();              /* set new pid */
+   }
+
    config = new_config_parser();
    parse_fd_config(config, configfile, M_ERROR_TERM);
 
@@ -216,11 +221,6 @@ int main (int argc, char *argv[])
       terminate_filed(0);
    }
 
-   if (!foreground) {
-      daemon_start();
-      init_stack_dump();              /* set new pid */
-   }
-
    set_thread_concurrency(me->MaxConcurrentJobs + 10);
    lmgr_init_thread(); /* initialize the lockmanager stack */