You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jm...@apache.org on 2015/07/13 23:54:34 UTC
cassandra git commit: On Windows,
wait 30 seconds on stop-server then terminate
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.2 5a090cc5a -> 052222615
On Windows, wait 30 seconds on stop-server then terminate
Patch by Andrew Tolbert; reviewed by jmckenzie for CASSANDRA-9791
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05222261
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05222261
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05222261
Branch: refs/heads/cassandra-2.2
Commit: 052222615a754e5bbb5299d51470a2ccdb70a5b0
Parents: 5a090cc
Author: Andrew Tolbert <an...@datastax.com>
Authored: Mon Jul 13 17:53:42 2015 -0400
Committer: Joshua McKenzie <jm...@apache.org>
Committed: Mon Jul 13 17:53:42 2015 -0400
----------------------------------------------------------------------
bin/stop-server.ps1 | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/05222261/bin/stop-server.ps1
----------------------------------------------------------------------
diff --git a/bin/stop-server.ps1 b/bin/stop-server.ps1
index 0d125dc..d1bc952 100644
--- a/bin/stop-server.ps1
+++ b/bin/stop-server.ps1
@@ -125,7 +125,10 @@ Function KillProcess
// Must wait here. If we don't and re-enable Ctrl-C
// handling below too fast, we might terminate ourselves.
- proc.WaitForExit(2000);
+ bool exited = proc.WaitForExit(30000);
+ if(!exited)
+ proc.Kill();
+
FreeConsole();
// Re-attach to current console to write output
@@ -137,7 +140,12 @@ Function KillProcess
SetConsoleCtrlHandler(null, false);
if (!silent)
- System.Console.WriteLine("Successfully sent ctrl+c to process with id: " + pidToKill + ".");
+ {
+ if(exited)
+ System.Console.WriteLine("Successfully sent ctrl+c to process with id: " + pidToKill + ".");
+ else
+ System.Console.WriteLine("Process with id: " + pidToKill + " did not exit after 30 seconds, killed.");
+ }
}
else
{