Reorder some statements
This commit is contained in:
parent
1ae20fa3eb
commit
88e1d56a98
1 changed files with 5 additions and 2 deletions
|
@ -326,13 +326,16 @@ void init(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
// Set signal handlers
|
// Set signal handlers
|
||||||
signal_pending = 0;
|
signal_pending = 0;
|
||||||
struct sigaction sa = {.sa_handler = signal_handler};
|
|
||||||
struct sigaction sa_chld = {.sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT};
|
struct sigaction sa_chld = {.sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT};
|
||||||
|
sigaction(SIGCHLD, &sa_chld, 0);
|
||||||
|
|
||||||
|
struct sigaction sa = {.sa_handler = signal_handler};
|
||||||
sigaction(SIGUSR1, &sa, 0);
|
sigaction(SIGUSR1, &sa, 0);
|
||||||
sigaction(SIGINT, &sa, 0);
|
sigaction(SIGINT, &sa, 0);
|
||||||
sigaction(SIGTERM, &sa, 0);
|
sigaction(SIGTERM, &sa, 0);
|
||||||
sigaction(SIGHUP, &sa, 0);
|
sigaction(SIGHUP, &sa, 0);
|
||||||
sigaction(SIGCHLD, &sa_chld, 0);
|
|
||||||
#ifdef BACKTRACE_ON_SIGNAL
|
#ifdef BACKTRACE_ON_SIGNAL
|
||||||
struct sigaction sa_crash = {.sa_handler = crash_handler};
|
struct sigaction sa_crash = {.sa_handler = crash_handler};
|
||||||
sigaction(SIGSEGV, &sa_crash, 0);
|
sigaction(SIGSEGV, &sa_crash, 0);
|
||||||
|
|
Loading…
Reference in a new issue