trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject [2/2] trafficserver git commit: Revert "TS-3618: Crashes in traffic_cop on shutdown / restart"
Date Thu, 21 May 2015 01:24:15 GMT
Revert "TS-3618: Crashes in traffic_cop on shutdown / restart"

This reverts commit 591984cf0a288d0ac51c5d49fed7faf1f07d2a9f.


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

Branch: refs/heads/master
Commit: 6f0b8c8ea7cc5f20a4f141f12e1b9768c696dbc4
Parents: 0b8029a
Author: Brian Geffon <briang@apache.org>
Authored: Wed May 20 18:23:41 2015 -0700
Committer: Brian Geffon <briang@apache.org>
Committed: Wed May 20 18:23:41 2015 -0700

----------------------------------------------------------------------
 cmd/traffic_cop/traffic_cop.cc | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6f0b8c8e/cmd/traffic_cop/traffic_cop.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_cop/traffic_cop.cc b/cmd/traffic_cop/traffic_cop.cc
index a535cdf..1a9ebad 100644
--- a/cmd/traffic_cop/traffic_cop.cc
+++ b/cmd/traffic_cop/traffic_cop.cc
@@ -81,7 +81,6 @@ static int coresig = 0;
 static int debug_flag = false;
 static int stdout_flag = false;
 static int stop_flag = false;
-static volatile int sig_term_received = 0;
 
 static char *admin_user;
 static uid_t admin_uid;
@@ -272,7 +271,7 @@ sig_term(int signum)
     child_status = status;
   }
   cop_log_trace("Leaving sig_term(%d), exiting traffic_cop\n", signum);
-  sig_term_received = 1;
+  exit(0);
 }
 
 static void
@@ -829,15 +828,7 @@ poll_read_or_write(int fd, int timeout, int inorout)
   info.revents = 0;
 
   do {
-    if (sig_term_received) {
-          exit(0);
-    }
-
     err = poll(&info, 1, timeout);
-
-    if (sig_term_received) {
-      exit(0);
-    }
   } while ((err < 0) && (transient_error(errno, TRANSIENT_ERROR_WAIT_MS)));
 
   if ((err > 0) && (info.revents & inorout)) {


Mime
View raw message