Module: Vx::Lib::Spawn::Process
Instance Method Summary collapse
Instance Method Details
#spawn(command, options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/vx/lib/spawn/process.rb', line 12 def spawn(command, = {}, &block) select_timeout = .delete(:pool_interval) || Spawn.pool_interval timeout = Spawn::Timeout.new .delete(:timeout) read_timeout = Spawn::ReadTimeout.new .delete(:read_timeout) status = spawn_command_internal(command, ) do |r| read_loop r, timeout, read_timeout, select_timeout, &block end compute_exit_code command, status, timeout, read_timeout end |