Method: AssLauncher::Support::Shell::ProcessHolder#kill

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

#killself

Note:

WARNIG! for command runned as cmd /C commnd can’t get pid of command process. In this case error raised

Kill the process

Returns:

  • (self)

Raises:



183
184
185
186
187
188
189
# File 'lib/ass_launcher/support/shell/process_holder.rb', line 183

def kill
  return self unless alive?
  fail KillProcessError, 'Can\'t kill subprocess runned in cmd.exe '\
    'on the windows machine' if self.class.cmd_exe_with_c? command
  Process.kill('KILL', pid)
  wait
end