[ruby/irb] windows does not support Process.kill("TERM", pid)
(https://github.com/ruby/irb/pull/1026) https://github.com/ruby/irb/commit/7bbb885163
This commit is contained in:
parent
e440268d51
commit
ed06f018bd
@ -34,7 +34,12 @@ module IRB
|
||||
# So to properly terminate the pager with Ctrl-C, we need to catch `IRB::Abort` and kill the pager process
|
||||
rescue IRB::Abort
|
||||
begin
|
||||
Process.kill("TERM", pid) if pid
|
||||
begin
|
||||
Process.kill("TERM", pid) if pid
|
||||
rescue Errno::EINVAL
|
||||
# SIGTERM not supported (windows)
|
||||
Process.kill("KILL", pid)
|
||||
end
|
||||
rescue Errno::ESRCH
|
||||
# Pager process already terminated
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user