Mysterious hang at busy loop after system()

$B0J2<$N$h$&$J%W%m%0%i%`$,<j85$N4D6-$N$R$H$D$G%O%s%0$7$^$9!#(B

$BIT;W5D$J$3$H$K!"@hF,$N(B system(‘true’)
$B$r<h$j=|$/$H%O%s%0$7$^$;$s!#(B

% cat y.rb
system(‘true’)

raised = false
t = Thread.new do
raised = true
loop { }
end

begin
raise
rescue
until raised || !t.alive?
Thread.pass
end
end
% ./ruby y.rb
^C^C^C^C^C^Z
zsh: suspended ./ruby y.rb
% kill -9 %1
%
[1] + killed ./ruby y.rb
% ./ruby -v
ruby 1.9.3dev (2011-06-15 trunk 32099) [x86_64-linux]
% uname -mrsv
Linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011
x86_64
% lsb_release -a
LSB Version:
core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty

(2011/06/15 15:29), Tanaka A. wrote:

$B0J2<$N$h$&$J%W%m%0%i%`$,<j85$N4D6-$N$R$H$D$G%O%s%0$7$^$9!#(B

$BIT;W5D$J$3$H$K!"@hF,$N(B system(‘true’) $B$r<h$j=|$/$H%O%s%0$7$^$;$s!#(B

ruby-core
$B$GOCBj$K$J$j$^$7$?$,!“1sF#$5$s$H;[email protected]$K$h$j(BUbuntu$B$N%P%0$G$”$k$3$H$,(B
$BJ,$+$C$F$$$^$9!#(BRuby$B$H$7$F$OBP=h$NM=Dj$O$J$$$N$G!"$*<j?t$G$9$,%+!<%M%k$r(B
$B%P!<%8%g%s%"%C%W$7$F$/[email protected]$5$$!#>:Y$O0J2<$r;2>[email protected]$1$^$9$G$7$g$&$+!#(B

http://redmine.ruby-lang.org/issues/4777

2011$BG/(B6$B7n(B15$BF|(B15:36 KOSAKI Motohiro
[email protected]:

(2011/06/15 15:29), Tanaka A. wrote:

$B0J2<$N$h$&$J%W%m%0%i%`$,<j85$N4D6-$N$R$H$D$G%O%s%0$7$^$9!#(B

$BIT;W5D$J$3$H$K!"@hF,$N(B system(‘true’) $B$r<h$j=|$/$H%O%s%0$7$^$;$s!#(B

ruby-core
$B$GOCBj$K$J$j$^$7$?$,!“1sF#$5$s$H;[email protected]$K$h$j(BUbuntu$B$N%P%0$G$”$k$3$H$,(B
$BJ,$+$C$F$$$^$9!#(BRuby$B$H$7$F$OBP=h$NM=Dj$O$J$$$N$G!"$*<j?t$G$9$,%+!<%M%k$r(B
$B%P!<%8%g%s%"%C%W$7$F$/[email protected]$5$$!#>:Y$O0J2<$r;2>[email protected]$1$^$9$G$7$g$&$+!#(B

$B$*$)!"N;2r$7$^$7$?(B.

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