summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2020-09-06 22:46:26 +0100
committerrofl0r <rofl0r@users.noreply.github.com>2020-09-06 22:46:26 +0100
commit8ba0ac4e8662ddc9c109229594f8a8ff0471b0df (patch)
treef88b079594b78a3c41cbedfb61747c172291e172 /src/main.c
parent3da66364dee0ae22abea20350af047cd95eb9f05 (diff)
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.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
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);