Method: AssLauncher::Support::Shell::ProcessHolder.run

Defined in:
lib/ass_launcher/support/shell/process_holder.rb

.run(command, options = {}) ⇒ ProcessHolder

Note:

WARNIG!!! not forgot kill of threads created and handled of ProcessHolder

Note:

For run command used popen3 whith command_string and *args. It not shell running. If command.args.size == 0 in command.args array will be pushed one empty string. For more info see Process.spawn documentation

Run command subprocess in new Thread and return instace for process controlling Thread wait process and handling process exit wihth Command#exit_handling

Parameters:

  • command (Command, Script)

    command runned in subprocess

  • options (Hash) (defaults to: {})

    options for Process.spawn

Returns:

Raises:



116
117
118
119
120
121
122
# File 'lib/ass_launcher/support/shell/process_holder.rb', line 116

def self.run(command, options = {})
  fail RunProcessError, 'Forbidden run cmd.exe with /K key'\
    if cmd_exe_with_k? command
  h = new(command, options)
  reg_process h
  h.run
end