equal
deleted
inserted
replaced
147 self.log.debug "Running SSH command with: %p" % [ Shellwords.shelljoin(cmd) ] |
147 self.log.debug "Running SSH command with: %p" % [ Shellwords.shelljoin(cmd) ] |
148 |
148 |
149 parent_reader, child_writer = IO.pipe |
149 parent_reader, child_writer = IO.pipe |
150 child_reader, parent_writer = IO.pipe |
150 child_reader, parent_writer = IO.pipe |
151 |
151 |
152 pid = spawn( *cmd, :out => child_writer, :in => child_reader, :close_others => true ) |
152 pid = Process.spawn( *cmd, :out => child_writer, :in => child_reader, :close_others => true ) |
153 child_writer.close |
153 child_writer.close |
154 child_reader.close |
154 child_reader.close |
155 |
155 |
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 ) |