Cannot stop with Ctrl+C

Issue #1952 has been updated by Hiroshi N…

Description updated

現在の挙動。

% cat foo.rb
Thread.new do
begin
begin
p :sleep
sleep
ensure
p :raise
raise
end
rescue
p :retry
retry
end
end.join
% ruby foo.rb
:sleep
^C:raise
:retry
:sleep
^C^C^C^C^C^C^C^Z


Feature #1952: cannot stop with Ctrl+C
https://bugs.ruby-lang.org/issues/1952#change-24690

Author: Usaku NAKAMURA
Status: Assigned
Priority: High
Assignee: Yukihiro M.
Category: core
Target version: 2.0.0

=begin
以下のスクリプトがCtrl+Cで停止せず、Ctrl+C押下後はkill -9でしか殺せません。

Thread.new do
begin
begin
sleep
ensure
raise
end
rescue
retry
end
end.join
=end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs