mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_optimization.rb (test_tailcall_interrupted_by_sigint):
send SIGKILL if the child process doesn't die within 1 second. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
76e047a843
commit
90bf4a8edb
2 changed files with 20 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Nov 6 23:36:07 2016 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/ruby/test_optimization.rb (test_tailcall_interrupted_by_sigint):
|
||||||
|
send SIGKILL if the child process doesn't die within 1 second.
|
||||||
|
|
||||||
Sun Nov 6 21:54:28 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
Sun Nov 6 21:54:28 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* tool/vcs.rb (export_changelog): generate ChangeLog file from
|
* tool/vcs.rb (export_changelog): generate ChangeLog file from
|
||||||
|
|
|
@ -338,9 +338,21 @@ EOS
|
||||||
in_p.write(script)
|
in_p.write(script)
|
||||||
in_p.close
|
in_p.close
|
||||||
out_p.gets
|
out_p.gets
|
||||||
Process.kill(:SIGINT, pid)
|
sig = :INT
|
||||||
*, stat = Process.wait2(pid)
|
begin
|
||||||
[stat, err_p.read]
|
Process.kill(sig, pid)
|
||||||
|
Timeout.timeout(1) do
|
||||||
|
*, stat = Process.wait2(pid)
|
||||||
|
[stat, err_p.read]
|
||||||
|
end
|
||||||
|
rescue Timeout::Error
|
||||||
|
if sig == :INT
|
||||||
|
sig = :KILL
|
||||||
|
retry
|
||||||
|
else
|
||||||
|
raise
|
||||||
|
end
|
||||||
|
end
|
||||||
}
|
}
|
||||||
assert_equal("INT", Signal.signame(status.termsig))
|
assert_equal("INT", Signal.signame(status.termsig))
|
||||||
assert_match(/Interrupt/, err, bug)
|
assert_match(/Interrupt/, err, bug)
|
||||||
|
|
Loading…
Add table
Reference in a new issue