cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject git commit: Implement -f functionality in stop-server.bat
Date Mon, 08 Sep 2014 20:33:22 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 ad9f51fc5 -> c1c337536


Implement -f functionality in stop-server.bat

patch by Philip Thompson; reviewed by Josh McKenzie for CASSANDRA-7901


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

Branch: refs/heads/cassandra-2.1
Commit: c1c3375361eac8de2f9da24663537ed9950b11a0
Parents: ad9f51f
Author: Joshua McKenzie <josh.mckenzie@datastax.com>
Authored: Mon Sep 8 15:30:20 2014 -0500
Committer: Joshua McKenzie <josh.mckenzie@datastax.com>
Committed: Mon Sep 8 15:30:20 2014 -0500

----------------------------------------------------------------------
 bin/stop-server.ps1 | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c1c33753/bin/stop-server.ps1
----------------------------------------------------------------------
diff --git a/bin/stop-server.ps1 b/bin/stop-server.ps1
index d8ac970..0d125dc 100644
--- a/bin/stop-server.ps1
+++ b/bin/stop-server.ps1
@@ -161,7 +161,7 @@ Function KillProcess
     $env:TMP = $oldTmp
     $env:TEMP = $oldTemp
 
-    $a = Get-Content $p
+    $pidToKill = Get-Content $p
     # If run in cygwin, we don't get the TITLE / pid combo in stop-server.bat but also don't
need
     # to worry about reattaching console output as it gets stderr/stdout even after the C#/C++
     # FreeConsole calls.
@@ -170,7 +170,14 @@ Function KillProcess
         $batchpid = -1
     }
 
-    [PowerStopper.Stopper]::StopProgram($a, $batchpid, $silent)
+    if ($f)
+    {
+        taskkill /f /pid $pidToKill
+    }
+    else
+    {
+        [PowerStopper.Stopper]::StopProgram($pidToKill, $batchpid, $silent)
+    }
 }
 
 #-----------------------------------------------------------------------------


Mime
View raw message