From 8ba0ac4e8662ddc9c109229594f8a8ff0471b0df Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 6 Sep 2020 22:46:26 +0100 Subject: [PATCH] do not catch SIGHUP in foreground-mode it's quite unexpected for an application running foreground in a terminal to keep running when the terminal is closed. also in such a case (if file logging is disabled) there's no way to see what's happening to the proxy. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index fc5ad45..d9f8a91 100644 --- a/src/main.c +++ b/src/main.c @@ -392,7 +392,7 @@ main (int argc, char **argv) exit (EX_OSERR); } - if (set_signal_handler (SIGHUP, takesig) == SIG_ERR) { + if (daemonized && set_signal_handler (SIGHUP, takesig) == SIG_ERR) { fprintf (stderr, "%s: Could not set the \"SIGHUP\" signal.\n", argv[0]); exit (EX_OSERR);