Skip to content

Commit 57613f3

Browse files
committed
Cannot send signal to process group on Windows
1 parent 657e455 commit 57613f3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tool/test-bundled-gems.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@
8383
if /mingw|mswin/ =~ RUBY_PLATFORM
8484
timeouts.delete(:TERM) # Inner process signal on Windows
8585
group = :new_pgroup
86+
pg = ""
8687
else
8788
group = :pgroup
89+
pg = "-"
8890
end
8991
pid = Process.spawn(test_command, group => true)
9092
timeouts.each do |sig, sec|
9193
if sig
9294
puts "Sending #{sig} signal"
93-
Process.kill("-#{sig}", pid)
95+
Process.kill("#{pg}#{sig}", pid)
9496
end
9597
begin
9698
break Timeout.timeout(sec) {Process.wait(pid)}

0 commit comments

Comments
 (0)