|
From: <jh...@us...> - 2011-10-13 20:21:30
|
Revision: 303
http://etch.svn.sourceforge.net/etch/?rev=303&view=rev
Author: jheiss
Date: 2011-10-13 20:21:24 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
In stop_server method send SIGKILL if SIGTERM doesn't do the trick.
unicorn will exit with just TERM, but webrick needs a KILL.
Modified Paths:
--------------
trunk/test/etchtest.rb
Modified: trunk/test/etchtest.rb
===================================================================
--- trunk/test/etchtest.rb 2011-10-13 20:20:31 UTC (rev 302)
+++ trunk/test/etchtest.rb 2011-10-13 20:21:24 UTC (rev 303)
@@ -141,7 +141,13 @@
def stop_server(server)
Process.kill('TERM', server[:pid])
- Process.waitpid(server[:pid])
+ sleep 1
+ r = Process.waitpid(server[:pid], Process::WNOHANG)
+ # SIGTERM is fine for unicorn but webrick doesn't die easily
+ if !r
+ Process.kill('KILL', server[:pid])
+ Process.waitpid(server[:pid])
+ end
end
def run_etch(server, testroot, options={})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|