aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libmain/shared.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index bc7b2dd51..709b6116a 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -120,6 +120,10 @@ static void initAndRun(int argc, char * * argv)
act.sa_flags = 0;
if (sigaction(SIGINT, &act, &oact))
throw SysError("installing handler for SIGINT");
+ if (sigaction(SIGTERM, &act, &oact))
+ throw SysError("installing handler for SIGTERM");
+ if (sigaction(SIGHUP, &act, &oact))
+ throw SysError("installing handler for SIGHUP");
/* Ignore SIGPIPE. */
act.sa_handler = SIG_IGN;