system_command: fix rare scenario of interrupt being reported to stderr
This commit is contained in:
parent
c92a40a751
commit
aea107b55a
@ -204,6 +204,8 @@ class SystemCommand
|
|||||||
Thread.handle_interrupt(ProcessTerminatedInterrupt => :never) do
|
Thread.handle_interrupt(ProcessTerminatedInterrupt => :never) do
|
||||||
each_line_from [raw_stdout, raw_stderr], &block
|
each_line_from [raw_stdout, raw_stderr], &block
|
||||||
end
|
end
|
||||||
|
# Handle race conditions with interrupts
|
||||||
|
Thread.current.report_on_exception = false
|
||||||
rescue ProcessTerminatedInterrupt
|
rescue ProcessTerminatedInterrupt
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user