Method: AssLauncher::Support::Shell::ProcessHolder#initialize

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

#initialize(command, options = {}) ⇒ ProcessHolder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ProcessHolder.

Parameters:

  • command (Command, Script)

    command runned in subprocess

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

    options for Process.spawn

Raises:



126
127
128
129
130
131
132
# File 'lib/ass_launcher/support/shell/process_holder.rb', line 126

def initialize(command, options = {})
  fail ArgumentError, 'Command was already running' if command.running?
  @command = command
  command.send(:process_holder=, self)
  @options = options
  options[:new_pgroup] = true if windows?
end