Be more forceful with ssh children that could be hanging for various reasons.
authorMahlon E. Smith <mahlon@martini.nu>
Thu, 22 May 2014 11:38:59 -0700
changeset 6 5afabb9d8a2c
parent 5 6177a734f764
child 7 4321943b8db5
Be more forceful with ssh children that could be hanging for various reasons.
lib/symphony/tasks/ssh.rb
--- a/lib/symphony/tasks/ssh.rb	Fri May 16 08:28:27 2014 -0700
+++ b/lib/symphony/tasks/ssh.rb	Thu May 22 11:38:59 2014 -0700
@@ -161,7 +161,10 @@
 		status = nil
 
 	ensure
-		pid, status = Process.waitpid2( pid ) if pid
+		if pid
+			Process.kill( :TERM, pid )
+			pid, status = Process.waitpid2( pid )
+		end
 		return status
 	end