# HG changeset patch # User Mahlon E. Smith # Date 1401302398 25200 # Node ID 4321943b8db532e7bd87325db143b21cef565798 # Parent 5afabb9d8a2cb4bb911308a4d4ed93edbfaadedf Be safer before TERMing pids, actually use the override options passed from the payload, if any. diff -r 5afabb9d8a2c -r 4321943b8db5 lib/symphony/tasks/ssh.rb --- a/lib/symphony/tasks/ssh.rb Thu May 22 11:38:59 2014 -0700 +++ b/lib/symphony/tasks/ssh.rb Wed May 28 11:39:58 2014 -0700 @@ -137,7 +137,7 @@ cmd = [] cmd << Symphony::Task::SSH.path - cmd += Symphony::Task::SSH.opts + cmd += opts cmd << '-p' << port.to_s cmd << '-i' << key if key @@ -162,7 +162,8 @@ ensure if pid - Process.kill( :TERM, pid ) + active = Process.kill( 0, pid ) rescue false + Process.kill( :TERM, pid ) if active pid, status = Process.waitpid2( pid ) end return status