Method: OpenC3.run_process

Defined in:
lib/openc3/top_level.rb

.run_process(command) ⇒ Object

Executes the command in a new Ruby Thread.

Parameters:

  • command (String)

    The command to execute via the 'system' call



173
174
175
176
177
178
179
180
181
182
# File 'lib/openc3/top_level.rb', line 173

def self.run_process(command)
  thread = nil
  thread = Thread.new do
    system(command)
  end
  # Wait for the thread and process to start
  sleep 0.01 until !thread.status.nil?
  sleep 0.1
  thread
end