trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject [3/5] git commit: Handle SIGINT the same way as SIGTERM
Date Mon, 14 Jan 2013 17:15:28 GMT
Handle SIGINT the same way as SIGTERM

also, disable debugging again


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6424a9c1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6424a9c1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6424a9c1

Branch: refs/heads/master
Commit: 6424a9c1c4b0b09c97a005240e1e5a206d2e918f
Parents: f0aaa22
Author: Igor Galić <i.galic@brainsware.org>
Authored: Tue Oct 30 22:29:46 2012 +0100
Committer: Igor Galić <i.galic@brainsware.org>
Committed: Mon Jan 14 18:09:38 2013 +0100

----------------------------------------------------------------------
 cop/TrafficCop.cc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6424a9c1/cop/TrafficCop.cc
----------------------------------------------------------------------
diff --git a/cop/TrafficCop.cc b/cop/TrafficCop.cc
index bea4d9f..7f05fd5 100644
--- a/cop/TrafficCop.cc
+++ b/cop/TrafficCop.cc
@@ -44,7 +44,7 @@ union semun
 #endif  // linux check
 
 // For debugging, turn this on.
-#define TRACE_LOG_COP 1
+// #define TRACE_LOG_COP 1
 
 #define OPTIONS_MAX     32
 #define OPTIONS_LEN_MAX 1024
@@ -1688,13 +1688,14 @@ init_signals()
   struct sigaction action;
 
   cop_log_trace("Entering init_signals()\n");
-  // Handle the SIGTERM signal: We simply do the same as
-  // in sig_child..
+  // Handle the SIGTERM and SIGINT signal:
+  // We kill the process group and wait() for all children
   action.sa_handler = sig_term;
   sigemptyset(&action.sa_mask);
   action.sa_flags = 0;
 
   sigaction(SIGTERM, &action, NULL);
+  sigaction(SIGINT, &action, NULL);
 
   // Handle the SIGCHLD signal. We simply reap all children that
   // die (which should only be spawned traffic_manager's).


Mime
View raw message