Introduction
Introduction Statistics Contact Development Disclaimer Help
Handle SIGHUP and SIGTERM - sacc - sacc - sacc(omys), simple console gopher cli…
git clone git://git.codemadness.org/sacc
Log
Files
Refs
LICENSE
---
commit 18a92be39ac2fea50ce2d63c7a03ad64528eb843
parent ed63d85224f39fc733d55b0d326085d7f4bd0b70
Author: Stefan Hagen <[email protected]>
Date: Fri, 16 Nov 2018 22:24:06 +0100
Handle SIGHUP and SIGTERM
Killing a terminal where sacc is running will send SIGHUP to sacc.
With this patch, sacc is handling SIGHUP and SIGTERM and cleans up
temporary files properly.
Diffstat:
M sacc.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/sacc.c b/sacc.c
@@ -958,6 +958,8 @@ setup(void)
sa.sa_flags = SA_RESTART;
sa.sa_handler = exit;
sigaction(SIGINT, &sa, NULL);
+ sigaction(SIGHUP, &sa, NULL);
+ sigaction(SIGTERM, &sa, NULL);
if (mkdir(tmpdir, S_IRWXU) < 0 && errno != EEXIST)
die("mkdir: %s: %s", tmpdir, strerror(errno));
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.