if (background) {
daemon_start();
init_stack_dump(); /* grab new pid */
- }
-
+ }
/* Create pid must come after we are a daemon -- so we have our final pid */
- create_pid_file(director->pid_directory, "bacula-dir", get_first_port_host_order(director->DIRaddrs));
- read_state_file(director->working_directory, "bacula-dir", get_first_port_host_order(director->DIRaddrs));
+ create_pid_file(director->pid_directory, "bacula-dir",
+ get_first_port_host_order(director->DIRaddrs));
+ read_state_file(director->working_directory, "bacula-dir",
+ get_first_port_host_order(director->DIRaddrs));
}
+ set_jcr_in_tsd(INVALID_JCR);
+ set_thread_concurrency(director->MaxConcurrentJobs * 2 +
+ 4 /* UA */ + 5 /* sched+watchdog+jobsvr+misc */);
+ lmgr_init_thread(); /* initialize the lockmanager stack */
+
load_dir_plugins(director->plugin_directory);
drop(uid, gid, false); /* reduce privileges if requested */
init_python_interpreter(&python_args);
#endif /* HAVE_PYTHON */
- set_jcr_in_tsd(INVALID_JCR);
- set_thread_concurrency(director->MaxConcurrentJobs * 2 +
- 4 /* UA */ + 4 /* sched+watchdog+jobsvr+misc */);
-
Dmsg0(200, "Start UA server\n");
start_UA_server(director->DIRaddrs);
init_stack_dump(); /* set new pid */
}
+ set_thread_concurrency(me->MaxConcurrentJobs + 10);
+ lmgr_init_thread(); /* initialize the lockmanager stack */
+
/* Maximum 1 daemon at a time */
- create_pid_file(me->pid_directory, "bacula-fd", get_first_port_host_order(me->FDaddrs));
- read_state_file(me->working_directory, "bacula-fd", get_first_port_host_order(me->FDaddrs));
+ create_pid_file(me->pid_directory, "bacula-fd",
+ get_first_port_host_order(me->FDaddrs));
+ read_state_file(me->working_directory, "bacula-fd",
+ get_first_port_host_order(me->FDaddrs));
load_fd_plugins(me->plugin_directory);
init_python_interpreter(&python_args);
#endif /* HAVE_PYTHON */
- set_thread_concurrency(10);
-
if (!no_signals) {
start_watchdog(); /* start watchdog thread */
init_jcr_subsystem(); /* start JCR watchdogs etc. */
void init_stack_dump(void)
{
main_pid = getpid(); /* save main thread's pid */
- lmgr_init_thread(); /* initialize the lockmanager stack */
}
/*
bindtextdomain("bacula", LOCALEDIR);
textdomain("bacula");
init_stack_dump();
+ lmgr_init_thread();
working_directory = "/tmp";
my_name_is(argc, argv, "bextract");
bindtextdomain("bacula", LOCALEDIR);
textdomain("bacula");
init_stack_dump();
+ lmgr_init_thread();
working_directory = "/tmp";
my_name_is(argc, argv, "bls");
bindtextdomain("bacula", LOCALEDIR);
textdomain("bacula");
init_stack_dump();
+ lmgr_init_thread();
my_name_is(argc, argv, "bscan");
init_msg(NULL, NULL);
init_stack_dump(); /* pick up new pid */
}
- create_pid_file(me->pid_directory, "bacula-sd", get_first_port_host_order(me->sdaddrs));
- read_state_file(me->working_directory, "bacula-sd", get_first_port_host_order(me->sdaddrs));
+ create_pid_file(me->pid_directory, "bacula-sd",
+ get_first_port_host_order(me->sdaddrs));
+ read_state_file(me->working_directory, "bacula-sd",
+ get_first_port_host_order(me->sdaddrs));
+
+ /* Make sure on Solaris we can run concurrent, watch dog + servers + misc */
+ set_thread_concurrency(me->max_concurrent_jobs * 2 + 4);
+ lmgr_init_thread(); /* initialize the lockmanager stack */
load_sd_plugins(me->plugin_directory);
init_python_interpreter(&python_args);
#endif /* HAVE_PYTHON */
- /* Make sure on Solaris we can run concurrent, watch dog + servers + misc */
- set_thread_concurrency(me->max_concurrent_jobs * 2 + 4);
-
/*
* Start the device allocation thread
*/
bindtextdomain("bacula", LOCALEDIR);
textdomain("bacula");
init_stack_dump();
+ lmgr_init_thread();
char **files = (char **) malloc (10 * sizeof(char *));
int i;
@$out /dev/null
messages
@$out $tmp/log1.out
-setdebug level=100 storage=File
+@#setdebug level=100 storage=File
label volume=TestVolume001 storage=File pool=File
run job=$JobName yes
@sleep 1