summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2020-01-07 11:25:43 +0100
committernsensfel <SpamShield0@noot-noot.org>2020-01-07 11:25:43 +0100
commit272e335b057dce34304d17074a81d3e3d0cde175 (patch)
tree40675a7019db9b249655293ed9d91ac1eb6d5f66 /src/server/interruption.c
parent99fc3898606bf9bc2a732facffc1a6fe6bfcf3a2 (diff)
...
Diffstat (limited to 'src/server/interruption.c')
-rw-r--r--src/server/interruption.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/interruption.c b/src/server/interruption.c
index 7dabd3d..12d3c83 100644
--- a/src/server/interruption.c
+++ b/src/server/interruption.c
@@ -71,6 +71,16 @@ int relabsd_server_initialize_signal_handlers (void)
return -1;
}
+ if (signal(SIGTERM, interrupt) == SIG_ERR)
+ {
+ RELABSD_S_FATAL("Unable to set the SIGTERM signal handler.");
+
+ (void) close(RELABSD_INTERRUPTION_PIPES[0]);
+ (void) close(RELABSD_INTERRUPTION_PIPES[1]);
+
+ return -1;
+ }
+
return 0;
}