lib/symphony/tasks/ssh.rb
changeset 5 6177a734f764
parent 4 3972315383b3
child 6 5afabb9d8a2c
equal deleted inserted replaced
4:3972315383b3 5:6177a734f764
   156 		self.log.debug "Yielding back to the run block."
   156 		self.log.debug "Yielding back to the run block."
   157 		@output = yield( parent_reader, parent_writer )
   157 		@output = yield( parent_reader, parent_writer )
   158 		@output = @output.split("\n").reject{|l| l =~ SSH_CLEANUP }.join
   158 		@output = @output.split("\n").reject{|l| l =~ SSH_CLEANUP }.join
   159 		self.log.debug "  run block done."
   159 		self.log.debug "  run block done."
   160 
   160 
   161 		pid, status = Process.waitpid2( pid )
   161 		status = nil
       
   162 
       
   163 	ensure
       
   164 		pid, status = Process.waitpid2( pid ) if pid
   162 		return status
   165 		return status
   163 	end
   166 	end
   164 
   167 
   165 end # Symphony::Task::SSH
   168 end # Symphony::Task::SSH
   166 
   169