mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
conf: only set sig handler if wasn't set already
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
This commit is contained in:
parent
dfc46f5ef3
commit
32e790cf03
@ -217,8 +217,8 @@ void sighup_handler(int signum)
|
||||
logger_reopen_all();
|
||||
}
|
||||
|
||||
static void (*old_sigsegv_handler)(int);
|
||||
static void (*old_sigabrt_handler)(int);
|
||||
static void (*old_sigsegv_handler)(int) = NULL;
|
||||
static void (*old_sigabrt_handler)(int) = NULL;
|
||||
|
||||
void sigsegv_handler(int signum)
|
||||
{
|
||||
@ -1257,8 +1257,10 @@ void parse_config_options(std::vector<const char*>& args)
|
||||
}
|
||||
|
||||
signal(SIGHUP, sighup_handler);
|
||||
old_sigsegv_handler = signal(SIGSEGV, sigsegv_handler);
|
||||
old_sigabrt_handler = signal(SIGABRT, sigabrt_handler);
|
||||
if (!old_sigsegv_handler)
|
||||
old_sigsegv_handler = signal(SIGSEGV, sigsegv_handler);
|
||||
if (!old_sigabrt_handler)
|
||||
old_sigabrt_handler = signal(SIGABRT, sigabrt_handler);
|
||||
|
||||
args = nargs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user