iHandle SIGHUP and SIGTERM - sacc - sacc(omys), simple console gopher client Err bitreich.org 70 hgit clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ URL:git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ bitreich.org 70 1Log /scm/sacc/log.gph bitreich.org 70 1Files /scm/sacc/files.gph bitreich.org 70 1Refs /scm/sacc/refs.gph bitreich.org 70 1Tags /scm/sacc/tag bitreich.org 70 1LICENSE /scm/sacc/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 18a92be39ac2fea50ce2d63c7a03ad64528eb843 /scm/sacc/commit/18a92be39ac2fea50ce2d63c7a03ad64528eb843.gph bitreich.org 70 1parent ed63d85224f39fc733d55b0d326085d7f4bd0b70 /scm/sacc/commit/ed63d85224f39fc733d55b0d326085d7f4bd0b70.gph bitreich.org 70 hAuthor: Stefan Hagen URL:mailto:sh+git@codevoid.de bitreich.org 70 iDate: Fri, 16 Nov 2018 22:24:06 +0100 Err bitreich.org 70 i Err bitreich.org 70 iHandle SIGHUP and SIGTERM Err bitreich.org 70 i Err bitreich.org 70 iKilling a terminal where sacc is running will send SIGHUP to sacc. Err bitreich.org 70 iWith this patch, sacc is handling SIGHUP and SIGTERM and cleans up Err bitreich.org 70 itemporary files properly. Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M sacc.c | 2 ++ Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 2 insertions(+), 0 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/sacc.c b/sacc.c /scm/sacc/file/sacc.c.gph bitreich.org 70 i@@ -958,6 +958,8 @@ setup(void) Err bitreich.org 70 i sa.sa_flags = SA_RESTART; Err bitreich.org 70 i sa.sa_handler = exit; Err bitreich.org 70 i sigaction(SIGINT, &sa, NULL); Err bitreich.org 70 i+ sigaction(SIGHUP, &sa, NULL); Err bitreich.org 70 i+ sigaction(SIGTERM, &sa, NULL); Err bitreich.org 70 i Err bitreich.org 70 i if (mkdir(tmpdir, S_IRWXU) < 0 && errno != EEXIST) Err bitreich.org 70 i die("mkdir: %s: %s", tmpdir, strerror(errno)); Err bitreich.org 70 .