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