OSSP CVS Repository

ossp - Check-in [3224]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3224
Date: 2003-Feb-11 14:49:26 (local)
2003-Feb-11 13:49:26 (UTC)
User:thl
Branch:
Comment: revert signals to default action so they can be used as expected if cleanup hangs at some point
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_main.c      1.69 -> 1.70     15 inserted, 2 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.69 -> 1.70

--- lmtp2nntp_main.c     2003/02/11 11:41:11     1.69
+++ lmtp2nntp_main.c     2003/02/11 13:49:26     1.70
@@ -710,9 +710,22 @@
 
     /* graceful shutdown */
     CUS:
+    signal(SIGCHLD, SIG_DFL);
+    signal(SIGHUP,  SIG_DFL);
+    signal(SIGINT,  SIG_DFL);
+    signal(SIGQUIT, SIG_DFL);
+    signal(SIGILL,  SIG_DFL);
+    signal(SIGBUS,  SIG_DFL);
+    signal(SIGSEGV, SIG_DFL);
+    signal(SIGSYS,  SIG_DFL);
+    signal(SIGTERM, SIG_DFL);
+    signal(SIGUSR1, SIG_DFL);
+    signal(SIGUSR2, SIG_DFL);
     logbook(ctx->l2, L2_LEVEL_NOTICE, "graceful shutdown shortly before exit - no more logging");
-    l2_channel_destroy(ctx->l2);
-    l2_env_destroy(ctx->l2_env);
+    if (ctx->l2 != NULL)
+        l2_channel_destroy(ctx->l2);
+    if (ctx->l2_env != NULL)
+        l2_env_destroy(ctx->l2_env);
     if (ctx->saServerbind)
         sa_destroy(ctx->saServerbind);
     if (ctx->saaServerbind)

CVSTrac 2.0.1