about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/init.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c
index 16965e019..939c4619f 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -897,7 +897,10 @@ init_signals(void)
     signal_ignore(SIGQUIT);
 #endif
 
-    install_handler(SIGHUP);
+    if (signal_ignore(SIGHUP) == SIG_IGN)
+	opts[HUP] = 0;
+    else
+	install_handler(SIGHUP);
     install_handler(SIGCHLD);
 #ifdef SIGWINCH
     install_handler(SIGWINCH);