module ProcessExecuter

def self.spawn_and_wait_with_options(command, options)

Other tags:
    Api: - private

Returns:
  • (ProcessExecuter::Result) - The result of the completed subprocess

Parameters:
  • options (ProcessExecuter::Options::SpawnAndWaitOptions) -- The options to use when running the command
  • command (Array) -- The command to run

Other tags:
    See: ProcessExecuter.spawn_and_wait - for full documentation
def self.spawn_and_wait_with_options(command, options)
  begin
    pid = Process.spawn(*command, **options.spawn_options)
  rescue StandardError => e
    raise ProcessExecuter::SpawnError, "Failed to spawn process: #{e.message}"
  end
  wait_for_process(pid, command, options)
end