We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d22e766 commit cec45aeCopy full SHA for cec45ae
tool/test-bundled-gems.rb
@@ -83,22 +83,24 @@
83
if /mingw|mswin/ =~ RUBY_PLATFORM
84
timeouts.delete(:TERM) # Inner process signal on Windows
85
group = :new_pgroup
86
+ pg = ""
87
else
88
group = :pgroup
89
+ pg = "-"
90
end
91
pid = Process.spawn(test_command, group => true)
92
timeouts.each do |sig, sec|
93
if sig
94
puts "Sending #{sig} signal"
- Process.kill("-#{sig}", pid)
95
+ Process.kill("#{pg}#{sig}", pid)
96
97
begin
98
break Timeout.timeout(sec) {Process.wait(pid)}
99
rescue Timeout::Error
100
101
rescue Interrupt
102
exit_code = Signal.list["INT"]
- Process.kill("-KILL", pid)
103
+ Process.kill("#{pg}KILL", pid)
104
Process.wait(pid)
105
break
106
0 commit comments