Updated Branches:
  refs/heads/master cb9e4b517 -> f3fa606a0

TS-2144 Avoid race on e.g. -Cclear which would crash the process


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

Branch: refs/heads/master
Commit: b5edc06aaf1395429100e3f548d3c0c1fbc2a2e0
Parents: cb9e4b5
Author: Leif Hedstrom <[email protected]>
Authored: Fri Sep 13 10:45:04 2013 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Fri Sep 13 10:45:11 2013 -0600

----------------------------------------------------------------------
 proxy/Main.cc | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b5edc06a/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 4a32593..3c063ad 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1516,17 +1516,13 @@ main(int /* argc ATS_UNUSED */, char **argv)
     Note("using the new remap processor system with %d threads", 
num_remap_threads);
     remapProcessor.setUseSeparateThread();
   }
-  remapProcessor.start(num_remap_threads, stacksize);
-
-  RecProcessStart(stacksize);
 
   init_signals2();
   // log initialization moved down
 
   if (command_flag) {
-    // pmgmt initialization moved up, needed by RecProcessInit
-    //pmgmt->start();
     int cmd_ret = cmd_mode();
+
     if (cmd_ret != CMD_IN_PROGRESS) {
       if (cmd_ret >= 0)
         _exit(0);               // everything is OK
@@ -1534,6 +1530,8 @@ main(int /* argc ATS_UNUSED */, char **argv)
         _exit(1);               // in error
     }
   } else {
+    remapProcessor.start(num_remap_threads, stacksize);
+    RecProcessStart(stacksize);
     initCacheControl();
     initCongestionControl();
     IpAllow::startup();

Reply via email to