Fix unused argument.
This commit is contained in:
parent
1b79e01c5b
commit
3c8497647e
@ -351,7 +351,7 @@ module Kernel
|
|||||||
|
|
||||||
IGNORE_INTERRUPTS_MUTEX = Thread::Mutex.new.freeze
|
IGNORE_INTERRUPTS_MUTEX = Thread::Mutex.new.freeze
|
||||||
|
|
||||||
def ignore_interrupts(_opt = nil)
|
def ignore_interrupts(quiet: false)
|
||||||
IGNORE_INTERRUPTS_MUTEX.synchronize do
|
IGNORE_INTERRUPTS_MUTEX.synchronize do
|
||||||
# rubocop:disable Style/GlobalVars
|
# rubocop:disable Style/GlobalVars
|
||||||
$ignore_interrupts_nesting_level = 0 unless defined?($ignore_interrupts_nesting_level)
|
$ignore_interrupts_nesting_level = 0 unless defined?($ignore_interrupts_nesting_level)
|
||||||
@ -360,8 +360,11 @@ module Kernel
|
|||||||
$ignore_interrupts_interrupted = false unless defined?($ignore_interrupts_interrupted)
|
$ignore_interrupts_interrupted = false unless defined?($ignore_interrupts_interrupted)
|
||||||
old_sigint_handler = trap(:INT) do
|
old_sigint_handler = trap(:INT) do
|
||||||
$ignore_interrupts_interrupted = true
|
$ignore_interrupts_interrupted = true
|
||||||
$stderr.print "\n"
|
|
||||||
$stderr.puts "One sec, cleaning up..."
|
unless quiet
|
||||||
|
$stderr.print "\n"
|
||||||
|
$stderr.puts "One sec, cleaning up..."
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|||||||
@ -75,7 +75,7 @@ module Utils
|
|||||||
exit!(true)
|
exit!(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
ignore_interrupts(:quietly) do # the child will receive the interrupt and marshal it back
|
ignore_interrupts(quiet: true) do # the child will receive the interrupt and marshal it back
|
||||||
begin
|
begin
|
||||||
socket = server.accept_nonblock
|
socket = server.accept_nonblock
|
||||||
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
|
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user