Method: Aggkit::ChildProcess::Windows::Lib.kill
- Defined in:
- lib/aggkit/childprocess/windows/lib.rb
.kill(signal, *pids) ⇒ Object
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/aggkit/childprocess/windows/lib.rb', line 240 def kill(signal, *pids) case signal when 'SIGINT', 'INT', :SIGINT, :INT signal = WIN_SIGINT when 'SIGBRK', 'BRK', :SIGBREAK, :BRK signal = WIN_SIGBREAK when 'SIGKILL', 'KILL', :SIGKILL, :KILL signal = WIN_SIGKILL when 0..9 # Do nothing else raise Error, "invalid signal #{signal.inspect}" end pids.map { |pid| pid if Lib.send_signal(signal, pid) }.compact end |