config: add 'fatal signal handlers' option

This will let us disable the sighandlers for SEGV, etc.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-08-23 09:37:37 -07:00
parent 7a631f9476
commit 0a2ec988f1
2 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,7 @@ OPTION(daemonize, OPT_BOOL, false)
OPTION(pid_file, OPT_STR, "")
OPTION(chdir, OPT_STR, "/")
OPTION(max_open_files, OPT_LONGLONG, 0)
OPTION(fatal_signal_handlers, OPT_BOOL, true)
OPTION(log_file, OPT_STR, "/var/log/ceph/$cluster-$name.log")
OPTION(log_max_new, OPT_INT, 1000)

View File

@ -111,7 +111,9 @@ void global_init(std::vector < const char * > *alt_def_args, std::vector < const
// signal stuff
int siglist[] = { SIGPIPE, 0 };
block_signals(siglist, NULL);
install_standard_sighandlers();
if (g_conf->fatal_signal_handlers)
install_standard_sighandlers();
if (g_conf->log_flush_on_exit)
g_ceph_context->_log->set_flush_on_exit();