Package: mcabber
Followup-For: Bug #722743

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Attached is a patch that fixes the issue; sent upstream.

Please note that the BTS web interface mangles cleartext attachments.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQJOBAEBCAA4BQJSM5DyMRpodHRwczovL3d3dy5kb21pbmlrLWdlb3JnZS5kZS9n
cGctcG9saWN5LnR4dC5hc2MACgkQt5o8FqDE8pbM5RAA1XeKQsh/Oanq/L8NP4sB
+wsEN53uESgcCnnfOifzAKpuVdsvtPRldAi5J2IEEBmRoDbD5E9grhbb+SXyj1Cv
e13sJPOidoC4UrapQst40tkb7fNdFxjRBt89wLMKlJ6zdfyT5M9u4azGMAghJV7x
ugwrTUewNgTJuXtHRnpmn2fgbTdHqeQRt/NnCdfqUVQ7uuXwH4Fmql1lpqZPq5y1
Z8QRKVdco9Kn3brZdwPrE5K3nhyJk06wwZC6Qvjkf+BeD/ABI28X/xHgu/IUOv5i
miQyQVUHDwL+kEKC/woXnIO9Ec9w4MnB6xFZJ1TUN6ibBoW3o4GHOVaMlLM38wpz
zhMxwKcGnlarNNHfi7zKaOv5C7YIiTOlzW/NZ2pRR1Jwu3Spm8x+dWu4QQZnlpvY
IabzskxxPu8/32emHZrmUwPmvO39q7uaMgfRx+cJgo6wdn8UIB7I+owUt5RuUrKo
eE1VihbRwUsrEz9aaaEFbxRBn7bm8Del8J15qieveeeMDjUykcNIu9gMuMy9AUK4
5RLN0/KcOt1XmRBpn8uVA0cbiQvEGWLQ/tlpbp2PUmCXlOWdSBZkNmxT+WDtbOXE
4j0UXPbQYUGR++UNnq26nxu8ioKhZG3fknEhcl5kbWLaVQ/CTiLmql0CN/ADSXzY
qlC906mtfkjaxnfPAoV5iUE=
=4y0O
-----END PGP SIGNATURE-----
Description: Cleanly exit on SIGHUP
 mcabber only handles SIGTERM and SIGINT, starting a clean shutdown
 sequence, which does not help when a user is running mcabber in an
 X terminal and the terminal window is closed or in similar situations.
 .
 This patch adds SIGHUP to the list of handled signals, so killing
 mcabber's terminal triggers a clean, non-interactive shutdown sequence.
Author: Dominik George <n...@naturalnet.de>
Bug-Debian: http://bugs.debian.org/722743
Origin: vendor
Forwarded: https://bitbucket.org/McKael/mcabber-crew/issue/124/does-not-exit-cleanly-on-sighup

--- a/mcabber/main.c
+++ b/mcabber/main.c
@@ -118,6 +118,8 @@ void sig_handler(int signum)
     mcabber_terminate("Killed by SIGTERM");
   } else if (signum == SIGINT) {
     mcabber_terminate("Killed by SIGINT");
+  } else if (signum == SIGHUP) {
+    mcabber_terminate("Killed by SIGHUP");
 #ifdef USE_SIGWINCH
   } else if (signum == SIGWINCH) {
     if (scr_curses_status())
@@ -332,6 +334,7 @@ int main(int argc, char **argv)
 
   signal(SIGTERM, sig_handler);
   signal(SIGINT,  sig_handler);
+  signal(SIGHUP,  sig_handler);
   signal(SIGCHLD, sig_handler);
 #ifdef USE_SIGWINCH
   signal(SIGWINCH, sig_handler);

Reply via email to