From 12d67c6bacb4726ad99040590aa64fd765c74167 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 14 Apr 2013 18:48:02 +0200 Subject: [PATCH] Move SIGHUP handling as soon as possible, so that repeated SIGHUPing is less likely to kill us. --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 0727314..39d5e1e 100644 --- a/main.cpp +++ b/main.cpp @@ -214,6 +214,8 @@ bool dry_run_config(const std::string &argv0, const std::string &config_filename int main(int argc, char **argv) { + signal(SIGHUP, hup); + // Parse options. int state_fd = -1; bool test_config = false; @@ -324,8 +326,6 @@ start: stats_thread->run(); } - signal(SIGHUP, hup); - struct timeval server_start; gettimeofday(&server_start, NULL); if (state_fd != -1) { -- 2.39.2