$&;[] dumps core

e$B1sF#$H?=$7$^$9!#e(B

1.9 e$B$G0J2<$N$h$&$K$9$k$HMn$A$^$9!#e(B

$ ./ruby -e ‘$&;[]’
-e:1: – control frame ----------
c:0003 p:0006 s:0006 b:0005 l:000004 d:000004 TOP -e:1
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

– backtrace of native function call (Use addr2line) –
0x80da8f5
0x80f3b40
0x80d7c26
0x80d8314
0x80d8709
0x8059042
0x8059066
0x805d5f1
0x8056d1f
0xb7df8ea8
0x8056c51

[BUG] Stack consistency error (sp: 6, bp: 5)
ruby 1.9.0 (2007-06-27) [i686-linux]

e$B%"%!<%H$7$^$7$?e(B (core dumped)

$`;0 e$B$de(B $1;0 e$B$G$bF1MM$KMn$A$^$9!#e(B
getglobal e$B$N%3!<%I$+$i?dB,$9$k$K!"$3$s$J46$8$G$7$g$&$+!#e(B
e$B$O$:$l$F$?$i$4$a$s$J$5$$!#e(B

Index: compile.c

— compile.c (revision 12635)
+++ compile.c (working copy)
@@ -3810,11 +3810,17 @@
case NODE_NTH_REF:{
ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(1) /* ‘~’ */,
INT2FIX(node->nd_nth << 1));

  • if (poped) {
  •  ADD_INSN(ret, nd_line(node), pop);
    
  • }
    break;
    }
    case NODE_BACK_REF:{
    ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(1) /* ‘~’ */,
    INT2FIX(0x01 | (node->nd_nth << 1)));
  • if (poped) {
  •  ADD_INSN(ret, nd_line(node), pop);
    
  • }
    break;
    }
    case NODE_MATCH:

[email protected]$G$9!#e(B

Yusuke ENDOH wrote:

1.9 e$B$G0J2<$N$h$&$K$9$k$HMn$A$^$9!#e(B
$ ./ruby -e ‘$&;[]’

getglobal e$B$N%3!<%I$+$i?dB,$9$k$K!"$3$s$J46$8$G$7$g$&$+!#e(B

e$B!!$4;XE&$"$j$,$H$&$4$6$$$^$7$?!#$=$s$J46$8$GBP1~$7$^$7$?!#e(B

e$B1sF#$G$9!#e(B

e$B%3%_%C%H$5$l$?$b$N$rGR8+$7$^$7$?$,!"$^[email protected]>$C$F$$$J$$$h$&$J5$$,$7$^$9!#e(B

e$B$"$H!"e(Bgetspecial e$B$,Nc30$d7Y9p=PNO$J$I$NI{:nMQ$r;}[email protected]$Oe(B
e$B$J$$$s$G$7$g$&$+!#e(B

[email protected]$G$9!#e(B

Yusuke ENDOH wrote:

e$B%3%_%C%H$5$l$?$b$N$rGR8+$7$^$7$?$,!"$^[email protected]>$C$F$$$J$$$h$&$J5$$,$7$^$9!#e(B

e$B!!$"$j$c!#$^[email protected]<#$C$F$^$;$s$G$7$?$+!#$I$&$$$&Nc$G$7$g$&!#$5$C$-e(B
e$B$N$ODL$C$?$3$H$O3NG’$7$?$s$G$9$,!#e(B

e$B!!$D$$$G$K!"=PMh$?$ie(B testcase e$B$J=q$-J}[email protected]$1$ke(B
e$B$H!"%F%9%H$K$5$/$C$HDI2C$G$-$F9,$;$G$9!#e(B

e$B$"$H!"e(Bgetspecial e$B$,Nc30$d7Y9p=PNO$J$I$NI{:nMQ$r;}[email protected]$Oe(B
e$B$J$$$s$G$7$g$&$+!#e(B

e$B!!B?J,$J$$$H;W$C$?$+$i>JN,$9$k$h$&$K$7$?$s$G$9$,!“2?$+=P$k$h$&e(B
e$B$JNc$C$F$”$j$^$7$?$C$1!#e(B

e$B1sF#$G$9!#e(B

e$B%3%_%C%H$5$l$?$b$N$rGR8+$7$^$7$?$,!"$^[email protected]>$C$F$$$J$$$h$&$J5$$,$7$^$9!#e(B

e$B$"$j$c!#$^[email protected]<#$C$F$^$;$s$G$7$?$+!#$I$&$$$&Nc$G$7$g$&!#$5$C$-e(B
e$B$N$ODL$C$?$3$H$O3NG’$7$?$s$G$9$,!#e(B

e$B$"$l!"$5$C$-e(B svn update
e$B$7$?$iJQ$J$3$H$K$J$C$?5$$,$7$?$s$G$9$,!"e(B
e$BA4It>C$7$Fe(B svn co e$B$7$?$i$A$c$s$HD>$C$F$^$7$?!#$4$a$s$J$5$$!#e(B
e$B<+J,[email protected]$,;D$C$F$?$N$+$b$7$l$^$;$s!#e(B

e$B$D$$$G$K!"=PMh$?$ie(B testcase e$B$J=q$-J}[email protected]$1$ke(B
e$B$H!"%F%9%H$K$5$/$C$HDI2C$G$-$F9,$;$G$9!#e(B

e$B$h$/$o$+$j$^$;$s$,!"e(Ba = ($&;[]); assert_equal([], a)
e$B$H$+=q$1$Pe(B
e$B$$$$$s$G$7$g$&$+!#e(B

e$B$"$H!"e(Bgetspecial e$B$,Nc30$d7Y9p=PNO$J$I$NI{:nMQ$r;}[email protected]$Oe(B
e$B$J$$$s$G$7$g$&$+!#e(B

e$BB?J,$J$$$H;W$C$?$+$i>JN,$9$k$h$&$K$7$?$s$G$9$,!“2?$+=P$k$h$&e(B
e$B$JNc$C$F$”$j$^$7$?$C$1!#e(B

e$B$$$(!“FC$K;[email protected]$,$”$k$o$1$8$c$J$/!"$J$$$N$+$J!<$H;W$C$?e(B
[email protected]$1$G$9!#0UL#?<[email protected]$$J}$7$A$c$C$F$9$_$^$;$s!#e(B

[email protected]$G$9!#e(B

Yusuke ENDOH wrote:

e$B$D$$$G$K!"=PMh$?$ie(B testcase e$B$J=q$-J}[email protected]$1$ke(B
e$B$H!"%F%9%H$K$5$/$C$HDI2C$G$-$F9,$;$G$9!#e(B

e$B$h$/$o$+$j$^$;$s$,!"e(Ba = ($&;[]); assert_equal([], a) e$B$H$+=q$1$Pe(B
e$B$$$$$s$G$7$g$&$+!#e(B

e$B!!$$$$5!2q$J$N$G$^$H$a$F$*$-$^$9!#e(B

e$B!!8=:_!"%F%9%H$r=q$/$H$3$m$,e(B Ruby
e$B$K$O$$$/$D$+$"$j$^$9!#0J2<$Ke(B
e$B;d$,CN$C$F$$$k$3$H$r=q$-$^$9$N$G;29M$K$7$F$/[email protected]$5$$!#;d$ND4$Y$?e(B
[email protected]$1$J$N$G!“2?$+ITHw!&ITB-$,$”$l$P$4;XE&$/[email protected]$5$$!#e(B

(1) bootstraptest/

e$BL\E*!&FCD’!'e(B
e$B!&%a%=%C%I8F$S=P$7$dB?=EBeF~$J$I!"!VF0$+$J$$$HOC$J$i$J$$!We(B
e$B!!5!G=$r%F%9%He(B
e$B!&$?$H$($P!"%3%"$NCf?H$rJQ$($?;~$J$I$KMxMQ!#$"$H!"JL$Ne(B Ruby
e$B%$e(B
e$B%s%?%W%j%?$N3+H/=i4|[email protected]$H;W$&e(B
e$B!&8e=R$Ne(B sample/test.rb [email protected]$rJd$&$?$a$KMQ0Ue(B
e$B!&%F%9%H$4$H$KJL%W%m%;%9$G<B9T$9$k$N$G!"Bg$-$J%W%m%0%i%$G$7$+e(B e$B:F8=$7$J$$%P%0!Je(BGCe$B$N%P%0$J$I!K$OH/8+$G$-$J$$$3$H$,B?$$e(B e$B!&%F%9%H$4$H$KJL%W%m%;%9$G<B9T$9$k$N$G!">uBV$rJQ$K$9$k%W%m%0%ie(B e$B%$N%F%9%H$K$OE,$7$F$$$k!Je(BKernele$B$N%a%=%C%I:FDj5A<B83$H$+!Ke(B
e$B!&%F%9%H4IM}%W%m%0%i%`$,e(B 1 file
e$B!Je(Bbootstraptest/runner.rbe$B!K$Je(B
e$B$N$G!"4JC1$K$$$8$C$?$j$G$-$k!#e(B

e$B5-=RJ}K!!'e(B
e$B!&e(Bbootstraptest/test*.rb e$B$K5-F~e(B
e$B!&e(Bmake btest e$B$Ge(B bootstraptest/test_*.rb e$BA4It$r<B9Te(B
e$B!&e(Bassert_equal(expected, program) e$B$H5-=Re(B
e$B!&e(Bprogram e$B$OC1BN$G<B9T2DG=$J$3$He(B

e$B<B9TJ}K!!‘e(B
e$B!&e(Bmake btest OPTS=’–set foo’ e$B$G!“e(Bfoo
e$B$H$$$&%U%!%$%kL>$r<B9Te(B
e$B!&e(BBASERUBYe$B!Je(Bruby 1.8
e$B$J$I!“30It%W%m%0%i%`!K$G%F%9%H$r<B9Te(B
e$B!Je(Bdrivere$B!K!#$D$^$j!”%F%9%H$9$kB&$O?.Mj$G$-$k!J$?$V$s!Ke(B
e$B!&e(Bdriver e$B$O!”%S%k%I$7$?e(B miniruby
e$B!Je(Btargete$B!K$K!“e(Bprogram e$B$r<B9Te(B
e$B$5$;!”$=$N7k2L$re(B expected e$B$HHf3S$9$k!#e(B
e$B!&e(Btarget e$B$rJQ99$9$k$K$Oe(B OPTS e$B$Ke(B --ruby=[target]
e$B$rDI2C$9$k!#$?e(B
e$B$H$($P!"e(Bjruby e$B$r;XDj$9$l$P!"e(Bjruby e$B$Ne(B 1.9
e$B;EMM%A%’%C%/$K$J$ke(B
e$B!J$d$k$N$+$7$i$s!Ke(B

(2) sample/test.rb

e$BL\E*!&FCD’!'e(B
e$B!&=>Mh$+$i$"$C$?=hM}7O$N%F%9%H!#e(Bbootstraptest/ [email protected]$C$?!#e(B
e$B!&0l$+=j$GNc30$,5/$-$k$H!"$=$N8e<B9T$5$l$J$$$N$G!“LVMeE*$J%F%9e(B
e$B%H$K$O8~$+$J$$e(B
e$B!&$?$/$5$s5!G=$r%F%9%H$9$k$N$G!”$"[email protected]$N9b$$=hM}7O$8$ce(B
e$B$J$$$H%F%9%H$rDL$i$J$$!#$H$$$&$+!"%F%9%H$,:G8e$^$G<B9T$G$-$J$$e(B
e$B!&$J$N$G!“e(Bfailure e$B$O$”$k$,!“e(Byarv [email protected]($$!#e(B
e$B!&@N$+$i$”$k%F%9%H$J$N$G!"%$%s%9%H!<%kA0$K$H$j$"$($:;n$9?M$,B?$$!#e(B

e$B5-=RJ}K!!'e(B
e$B!&e(Bsample/test.rb e$B$K5-F~e(B
e$B!&e(Btest_ok() e$B%a%=%C%I$NBh0l0z?t$Ke(B false e$B$,Mh$k$H<:GTe(B
e$B!&e(Btest_ok(expected == result) e$B$,%$%G%#%*%`e(B

e$B<B9TJ}K!!'e(B
e$B!&e(Bmake test e$B$G<B9Te(B
e$B!&%S%k%I$7$?e(B miniruby e$B$GA4It<B9Te(B
e$B!&e(Bminiruby e$B$J$N$G3HD%%i%$%V%i%j!Je(B.soe$B!K$,;H$($J$$!#e(B
e$B!&%S%k%I$7$?e(B miniruby
e$B$,Ie$C$F$k$H!"%F%9%H7k2L$b?.MQ$J$i$J$$$+e(B
e$B$b$7$l$J$$e(B

(3) test/

e$BL\E*!'e(B
e$B!&e(Btest/unit e$B$rMxMQ$7$?%F%9%He(B
e$B!&<g$K!“3HD%%i%$%V%i%j$d%i%$%V%i%j$N%F%9%H$J$I$KMxMQe(B
e$B!&e(Bruby e$B$N%3%”$N5!G=$K$D$$$F$N%F%9%H$bB8:_e(B
e$B!&e(Btest/unit e$B$Oe(B optparse.rb
e$B$rMxMQ$7$F$$$k$,!“e(Boptparse.rb e$B$OJQe(B
e$BBVE*$Je(B Ruby
e$B$N5!G=$r$?$/$5$s;H$C$F$$$k$N$G!”[email protected]$N9b$$e(B
Rubye$B=hM}7O$8$c$J$$$H!"$3$N%F%9%H$O<B9T$G$-$J$$e(B
e$B!&$b$A$m$s%S%k%I$7$?e(B ruby
e$B$,Ie$C$F$$$k$H7k2L$O?.MQ$G$-$J$$$,!"e(B
test/unit e$B$,<B9T$G$-$F$$$k;[email protected]$GBgJ,?.MQ$G$-$k$+$b$7$l$J$$!J$Ge(B
e$B$-$J$$$+$b$7$l$J$$!#<BBN83$H$7$F!#!Ke(B

e$B5-=RJ}K!!'e(B
e$B!&e(Btest/unit e$B$N5-K!$K$h$j5-=Re(B
e$B!&e(Btest/test_foo.rbe$B!"$b$7$/$Oe(B test/foo/test_.rb e$B$K5-=Re(B
e$B!&e(Bruby e$B$N%3%"5!G=$Oe(B test/ruby/test_
.rb e$B$K5-=Re(B

e$B<B9TJ}K!!'e(B
e$B!&e(Bmake test-all e$B$H<B9T$9$k$H!"e(Btest/
e$B0J2<$NA4%F%9%H$,<B9T$5$l$ke(B
e$B!&e(Bmake test-all TESTS=xxx e$B$H$9$k$H!"e(Bxxx
e$B$N%F%9%H$,<B9T$5$l$ke(B
e$B!!$?$H$($P!"e(BTESTS=ruby [email protected]$H!"e(Btest/ruby/
e$B0J2<$,<B9T$5$l$ke(B
e$B!&e(BTESTS e$B$Ke(B ‘-x yyy’ e$B$H$9$k$H!“e(Byyy
e$B$H$$$&L>A0$N4^[email protected]%F%9%H$,<Be(B
e$B9T$5$l$J$$!#e(B
e$B!&e(BTESTS e$B$Ke(B ‘-v’
e$B$r4^$^$;$F$*$/$H!”%F%9%H9L\$,I=<($5$l$ke(B e$B!&$=$NB>!"%*%W%7%g%s$Oe(B test/unit e$B$K=$:$k!JB?J,!Ke(B
e$B!&%S%k%I$7$?e(B ruby e$B%W%m%0%i%`$GA4It<B9T$9$ke(B
e$B!&e(Bruby e$B$J$N$G3HD%%i%$%V%i%j!Je(B.soe$B!K$r;H$($ke(B

e$B!!$G!":#2s$N%1!<%9$re(B (1), (2), (3)
e$B$N$I$l$KJ,N$9$k$+!"$J$s$Ge(B e$B$9$,!"$"$s$^$jE}0l$7$?4p=$,$"$j$^$;$s!#>e5-FCD’$r8+$F!"=q$-$de(B
e$B$9$$$H$3$m$,$$$$$N$+$b$7$l$^$;$s!#e(B

e$B!!$?$H$($P!“e(Bbootstraptest/test_mine.rb e$B$H$$$&%U%!%$%k$r:n$Ce(B
e$B$F!”$=$3$Ke(B assert_equal() e$B$H$7$F5-=R$7$F$*$$$F$d$j!“e(Bmake
btest
OPTS=–set=mine e$B$H$7$F<B9T$9$k$h$&$K$9$l$P!”<+J,MQ%F%9%H$,$de(B
e$B$j$d$9$$$+$b$7$l$^$;$s!#e(B

e$B!!$=$&$$$($P!":#$N%P!<%8%g%s$C$FEDCf=jM-$NLVMeE*$J%F%9%H$C$Fe(B
e$BDL$C$F$^$9!)e(B

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SASADA Koichi wrote:

(3) test/

e$B!&e(Bruby e$B$N%3%"5!G=$Oe(B test/ruby/test_*.rb e$B$K5-=Re(B

e$B85$Oe(Bsample/test.rbe$B$r!“e(Btest/ruby/test_*e$B$H$7$F0?”$7$?$s$G$9$h!#$7$+$7!“e(B
e$B$^$D$b$H$5$s$Oe(Bsample/test.rbe$B$r;H$$B3$1$?$N$G!”$?$V$s$b$&!"F14|$G$-$F$J$$e(B
e$B$H;W$$$^$9!#e(B

sample/test.rbe$B$r;D$7$F!“e(Btest/ruby/test_*e$B$O>C$7$A$c$C$F$b$$$$$+$b!#e(B
e$B$^$?$O5U!#$”[email protected]_$Ne(Bbootstraptest/e$B$X0\9T!#e(B

e$B$$$C$=$N$3$He(BJRubye$B$N%F%9%H$rA4It$b$C$F$/$k$H$+!#e(B

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iQEVAwUBRoNLiR9L2jg5EEGlAQJBhAf+Pz6h4P93eoTl5dCDy8p2DGf9IMqIL/vU
boIxQvzttxxmk2k7O6j10NFtcRtELguWeACYvS+xVeinQe1oDuh7Ut3ByTWfwe8z
HVb2suudopdp+3SHh0/s3dt90zk8lLSMJKZAtJWLUwN2p6EIxj2KXrVWAIEONUFr
iu1tHktohFPXm31IMjUCb11rVgWY73iQFJce0RVCNm4OxaFV76KxV2VdZcPsvD3B
2MvGFaZdv47mO+xo79JXI5SaZegIXJX9TjhhL5z/0CIQRhBuns2pc3w0hDIGMGcO
NKPRXRvINFECBvMa+cNIZcZ9/e9LcKBeHb6xTokI5kzCXC71pbWzzg==
=bGu2
-----END PGP SIGNATURE-----

In article [email protected],
SASADA Koichi [email protected] writes:

(1) bootstraptest/

e$B!&%F%9%H$4$H$KJL%W%m%;%9$G<B9T$9$k$N$G!"Bg$-$J%W%m%0%i%$G$7$+e(B e$B:F8=$7$J$$%P%0!Je(BGCe$B$N%P%0$J$I!K$OH/8+$G$-$J$$$3$H$,B?$$e(B e$B!&%F%9%H$4$H$KJL%W%m%;%9$G<B9T$9$k$N$G!">uBV$rJQ$K$9$k%W%m%0%ie(B e$B%$N%F%9%H$K$OE,$7$F$$$k!Je(BKernele$B$N%a%=%C%I:FDj5A<B83$H$+!Ke(B

e$B$=$N$;$$$+!“e(B^C
e$B0lH/$G;_$^$i$J$$$N$G$9$,!”$=$s$J$3$H$O$"$j$^$;$s$+e(B?

[email protected]$G$9!#e(B

NAKAMURA, Hiroshi wrote:

e$B!&e(Bruby e$B$N%3%"5!G=$Oe(B test/ruby/test_*.rb e$B$K5-=Re(B

e$B85$Oe(Bsample/test.rbe$B$r!“e(Btest/ruby/test_*e$B$H$7$F0?”$7$?$s$G$9$h!#$7$+$7!“e(B
e$B$^$D$b$H$5$s$Oe(Bsample/test.rbe$B$r;H$$B3$1$?$N$G!”$?$V$s$b$&!"F14|$G$-$F$J$$e(B
e$B$H;W$$$^$9!#e(B

e$B!!$$!"$=$&[email protected]$C$?$s$G$9$+!#e(B

sample/test.rbe$B$r;D$7$F!“e(Btest/ruby/test_*e$B$O>C$7$A$c$C$F$b$$$$$+$b!#e(B
e$B$^$?$O5U!#$”[email protected]_$Ne(Bbootstraptest/e$B$X0\9T!#e(B

e$B$$$C$=$N$3$He(BJRubye$B$N%F%9%H$rA4It$b$C$F$/$k$H$+!#e(B

e$B!!e(Btest/ruby/test_*
e$B$O!"$=$l$O$=$l$GFH<+?J2=$7$A$c$C$F$k$H$3$me(B
e$B$,$"$k$s$G$9$h$M$’!#e(B

e$B!!e(BJRuby
e$B$N%F%9%H!"[email protected]$o$l$F=i$a$F%A%’%C%/$7$?$s$G$9$,!“7k9=$?$/e(B
e$B$5$s$”$k$s$G$9$M!#;H$($J$$$+9M$($F$_$^$9!#e(B

[email protected]$G$9!#e(B

Tanaka A. wrote:

(1) bootstraptest/

e$B!&%F%9%H$4$H$KJL%W%m%;%9$G<B9T$9$k$N$G!"Bg$-$J%W%m%0%i%$G$7$+e(B e$B:F8=$7$J$$%P%0!Je(BGCe$B$N%P%0$J$I!K$OH/8+$G$-$J$$$3$H$,B?$$e(B e$B!&%F%9%H$4$H$KJL%W%m%;%9$G<B9T$9$k$N$G!">uBV$rJQ$K$9$k%W%m%0%ie(B e$B%$N%F%9%H$K$OE,$7$F$$$k!Je(BKernele$B$N%a%=%C%I:FDj5A<B83$H$+!Ke(B

e$B$=$N$;$$$+!“e(B^C e$B0lH/$G;_$^$i$J$$$N$G$9$,!”$=$s$J$3$H$O$"$j$^$;$s$+e(B?

e$B!!;_$^$j$^$;$s!#e(B

e$B!!$G!"$3$l$OC/$bJV;v$r$7$F$$$J$$e(B [ruby-dev:31007]
[email protected]$H$O;We(B
e$B$$$^$9$,!"$3$l$O$I$&$9$k$Y$-$J$s$G$7$g$&$+!#;d$O!“e(B1.8
e$B$,$3$&$$e(B
e$B$&5sF0$J$N$G!”$3$&$$$&[email protected]$H;W$C$F$$$^$7$?!#$I$&$9$k$H9,$;$Je(B
e$B?M$,A}$($k$N$+$O!"7P83ITB-$G$o$+$j$^$;$s!#<BAu$K$D$$$F$b$h$/$oe(B
e$B$+$j$^$;$s!#e(B

[email protected][email protected]$H$J$s$J$N$G!"$$$/$D$+$N=hM}[email protected]$H$I$&$J$k$+D4$Y$Fe(B
e$B$_$^$7$?!#e(B

ruby 1.8:

ruby -e ‘loop{p system(“sleep 1”)}’
-> ^C e$B$9$k$He(B false e$B$rJV$9!#;$^$i$J$$!#e(B
e$B!!!$A$J$
$K!"e(Bkillall [email protected]$1$G$O;_$^$i$J$$!#e(B
e$B!!!e(B-KILL e$BIU$1$J$$$H$$$1$J$+$C$?!#e(B

perl:

perl -e ‘while(1){print system(“sleep 1”)}’
-> ^C e$B$9$k$He(B 2 e$B$rJV$9!#;$^$i$J$$!#e(Bkillall
e$B$G;
$^$C$?!#e(B

python:

python -c ’
import os
while True:
a = os.system(“sleep 1”)
print a

-> Perl e$B$H0l=o!#e(B

gauche:

echo ’
(use gauche.process)
(dotimes (i 100000)
(let ((r (run-process “sleep” “1” :wait #t)))
(print r)))
’ | gosh

->

#<process 27434 “sleep” inactive>
#<process 27438 “sleep” inactive>
#<process 27439 “sleep” inactive> <- e$B$3$3$Ge(B ^C
*** UNHANDLED-SIGNAL-ERROR: unhandled signal 2 (SIGINT)
Stack Trace:
gosh e$B%W%m%;%9$,=*N;e(B

sh:
$ while true; do sleep 1; echo $?; done

-> ^C [email protected]$o$:$K=*N;e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31111] Re: $&;[] dumps core”
on Mon, 2 Jul 2007 22:17:39 +0900, SASADA Koichi [email protected]
writes:

|e$B!!$G!"$3$l$OC/$bJV;v$r$7$F$$$J$$e(B [ruby-dev:31007] [email protected]$H$O;We(B
|e$B$$$^$9$,!"$3$l$O$I$&$9$k$Y$-$J$s$G$7$g$&$+!#;d$O!“e(B1.8 e$B$,$3$&$$e(B
|e$B$&5sF0$J$N$G!”$3$&$$$&[email protected]$H;W$C$F$$$^$7$?!#$I$&$9$k$H9,$;$Je(B
|e$B?M$,A}$($k$N$+$O!"7P83ITB-$G$o$+$j$^$;$s!#<BAu$K$D$$$F$b$h$/$oe(B
|e$B$+$j$^$;$s!#e(B

rb_syswait()e$B$,e(BSIGHUP, SIGQUIT,
SIGINTe$B$re([email protected]_Dj$7$F$$$ke(B
e$B$+$i$G$9$M!#$G!"$3$l$,$J$<$=$&$7$F$$$k$+$H$$$&$H!"<B$O;d$K$be(B
e$B$o$+$i$J$$$N$G$9$,!"D>@\E*$JM}M3$Oe(BPerle$B$N??;[email protected]$C$?e(B
e$B$H;W$$$^$9!#e(B

|perl -e ‘while(1){print system(“sleep 1”)}’
|-> ^C e$B$9$k$He(B 2 e$B$rJV$9!#;$^$i$J$$!#e(Bkillall e$B$G;$^$C$?!#e(B

e$B$G$9$+$i!"e(BPerle$B$HF1$8?6$kIq$$$r$9$k$o$1$G$9e(B(e$B$A$g$C$H0c$&$1$Ie(B)e$B!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31117] Re: $&;[] dumps core”
on Tue, 3 Jul 2007 14:29:33 +0900, Tanaka A. [email protected]
writes:

|e$B$D$^$j!"e(B
|* e$B;R%W%m%;%[email protected]$1$,@8$-;D$C$F!“C<Kv$r<h$j9g$&$H$+$N$3$H$rHr$1$ke(B
|* vi e$B$Ne(B ! e$B$_$?$$$J$b$N$G%f!<%6$,<B9T$7$?;~$K$Oe(B ^C e$B$O;R%W%m%;%[email protected]$1$,;`$L$Y$-e(B
|e$B$H$$$&M}M3$,$”$k$h$&$G$9!#e(B

e$B$=$&[email protected]$C$?$N$+!#e(B

|e$B$"$k$$$O!“e(BC e$B$de(B Perl e$B$N$h$&$KNc30$,[email protected]$3&$+$ie(B Ruby e$B$N$h$&$Ke(B
|e$BNc30$,$”[email protected]$3&$K0$C$?;[email protected]$G!"e(BAPI e$B$rJQ$($k$Y$-$J$N$G$O$J$$$+!"e(B
|e$B$H$$$&$3$H$b9M$($i$l$^$9!#e(B

e$B3N$+$K!#e(B

|e$B;R%W%m%;%[email protected]$1$,@8$-;D$k$N$O$?$7$+$K$"$^$j$h$m$7$/$J$$$h$&$Ke(B
|e$B;W$$$^$9$,!“e(Bvi e$B$Ne(B ! e$B$_$?$$$J$N$Oe(B system e$B$NMQK!$H$7$F$”$^$jB?e(B
|e$B$$$H$O;W$($J$$$N$G5$$K$7$J$$$3$H$K$7$F!";R%W%m%;%9<B9TCf$Ke(B
|SIGINT e$B$,$-$?$i!";R%W%m%;%9$,;`[email protected]$Ke(B Interrupt e$BNc30$,H/@8e(B
|e$B$9$k$H$+$O$I$&$G$7$g$&$+!#e(B
|
|e$B$G$b!"e(BC e$B$Ne(B system e$B$r;H$C$F<BAu$9$k$N$OL5M}$+$Je(B…

Rubye$B$G$Oe(B(e$B$[$H$s$I$N%W%i%C%H%U%)!<%`$Ge(B)Ce$B$Ne(Bsysteme$B$O;H$C$F$J$$e(B
e$B$s$G!"<BAu$O2DG=$J5$$,$7$^$9!#$3$NJU$O$"$s$^[email protected]$G$J$$$s$Ge(B
e$B$I$J$?$+$,L>>h$j$r>e$2$F$/[email protected]$5$k$H$&$l$7$$$s$G$9$,!#e(B

In article [email protected],
SASADA Koichi [email protected] writes:

e$B$=$N$;$$$+!“e(B^C e$B0lH/$G;_$^$i$J$$$N$G$9$,!”$=$s$J$3$H$O$"$j$^$;$s$+e(B?

e$B!!;_$^$j$^$;$s!#e(B

e$B!!$G!"$3$l$OC/$bJV;v$r$7$F$$$J$$e(B [ruby-dev:31007] [email protected]$H$O;We(B
e$B$$$^$9$,!"$3$l$O$I$&$9$k$Y$-$J$s$G$7$g$&$+!#;d$O!“e(B1.8 e$B$,$3$&$$e(B
e$B$&5sF0$J$N$G!”$3$&$$$&[email protected]$H;W$C$F$$$^$7$?!#$I$&$9$k$H9,$;$Je(B
e$B?M$,A}$($k$N$+$O!"7P83ITB-$G$o$+$j$^$;$s!#<BAu$K$D$$$F$b$h$/$oe(B
e$B$+$j$^$;$s!#e(B

e$B;$a$h$&$H;W$C$Fe(B ^C
e$B$rF~NO$7$F$$$k$N$K!";
$^$i$J$$$N$OIT9,$G$9!#e(B

ruby 1.8:
perl:
python:

e$B$&$%$`!#e(Bruby e$B0J30$K$b$"$C$?$N$+!#e(B

In article [email protected],
Yukihiro M. [email protected] writes:

rb_syswait()e$B$,e(BSIGHUP, SIGQUIT, SIGINTe$B$re([email protected]_Dj$7$F$$$ke(B
e$B$+$i$G$9$M!#$G!"$3$l$,$J$<$=$&$7$F$$$k$+$H$$$&$H!"<B$O;d$K$be(B
e$B$o$+$i$J$$$N$G$9$,!"D>@\E*$JM}M3$Oe(BPerle$B$N??;[email protected]$C$?e(B
e$B$H;W$$$^$9!#e(B

e$BM=A[30$K$"$C$?$N$G!"5/8;$r$?$I$C$F$$k$H!"$I$&$b!"e(BC e$B$Ne(B
system e$B$+$i$7$F;
$^$i$J$$$h$&$G$9$M!#e(B

SUS e$B$Ne(B system e$B$N9`[email protected]$,$"$C$F0J2<$N$h$&$K=q$$$F$"$j$^$9!#e(B
http://www.opengroup.org/onlinepubs/007904975/functions/system.html#tag_03_757_07

Note that, while system() must ignore SIGINT and SIGQUIT and block 

SIGCHLD
while waiting for the child to terminate, the handling of signals in
the
executed command is as specified by fork() and exec. For example, if
SIGINT
is being caught or is set to SIG_DFL when system() is called, then
the
child is started with SIGINT handling set to SIG_DFL.

Ignoring SIGINT and SIGQUIT in the parent process prevents 

coordination
problems (two processes reading from the same terminal, for example)
when
the executed command ignores or catches one of the signals. It is
also
usually the correct action when the user has given a command to the
application to be executed synchronously (as in the ‘!’ command in
many
interactive applications). In either case, the signal should be
delivered
only to the child process, not to the application itself. There is
one
situation where ignoring the signals might have less than the
desired
effect. This is when the application uses system() to perform some
task
invisible to the user. If the user typed the interrupt character (
“^C”,
for example) while system() is being used in this way, one would
expect the
application to be killed, but only the executed command is killed.
Applications that use system() in this way should carefully check
the
return status from system() to see if the executed command was
successful,
and should take appropriate action when the command fails.

e$B$D$^$j!"e(B

  • e$B;R%W%m%;%[email protected]$1$,@8$-;D$C$F!"C<Kv$r<h$j9g$&$H$+$N$3$H$rHr$1$ke(B
  • vi e$B$Ne(B ! e$B$_$?$$$J$b$N$G%f!<%6$,<B9T$7$?;~$K$Oe(B ^C
    e$B$O;R%W%m%;%[email protected]$1$,;`$L$Y$-e(B
    e$B$H$$$&M}M3$,$"$k$h$&$G$9!#e(B

e$B$7$+$7!"$3$N07$$$,$h$m$7$/$J$$%1!<%9$b$"$k$3$H$,$"$2$i$l$F$$e(B
e$B$^$9!#$3$l$O6qBNE*$K$O%f!<%6$+$i$O8+$($J$$$H$3$m$Ge(B system e$B$re(B
e$B;H$&!"$H$$$&%1!<%9$G!“e(Bbootstraptest e$B$O$^$5$K$=$NNc$H9M$($i$le(B
e$B$^$9!#$=$7$F!”$=$N%1!<%9$G$O%"%W%j%1!<%7%g%s$,Cm0U?<$/e(B
system e$B$NJV$jCM$r8!::$9$Y$-$G$"$k!"$H$b=q$+$l$F$$$^$9!#e(B

e$B$H$$$&$3$H$O!"e(BRuby e$B$Ne(B system (e$B$de(B ) e$B$,e(B C e$B$Ne(B system e$B$N;EMM$re(B e$B0z$-7Q$$$G$$$k$H$9$k$H!"e(Bbootstraptest e$B$G!"e(Bsystem e$B$NJV$jCMe(B (e$B$H$$$&$+!"e(B [email protected]$+$ie(B $?)
e$B$rE,@Z$K8!::$7$F$$$J$$$N$,LdBj$G$“e(B
e$B$k!”$H$$$&$3$H$K$J$j$^$9!#e(B

e$B$J$s$G8!::$7$J$$$s$G$9$+e(B?

e$B$"$k$$$O!“e(BC e$B$de(B Perl e$B$N$h$&$KNc30$,[email protected]$3&$+$ie(B Ruby
e$B$N$h$&$Ke(B
e$BNc30$,$”[email protected]$3&$K0$C$?;[email protected]$G!"e(BAPI
e$B$rJQ$($k$Y$-$J$N$G$O$J$$$+!"e(B
e$B$H$$$&$3$H$b9M$($i$l$^$9!#e(B

e$B;R%W%m%;%[email protected]$1$,@8$-;D$k$N$O$?$7$+$K$"$^$j$h$m$7$/$J$$$h$&$Ke(B
e$B;W$$$^$9$,!“e(Bvi e$B$Ne(B ! e$B$_$?$$$J$N$Oe(B system
e$B$NMQK!$H$7$F$”$^$jB?e(B
e$B$$$H$O;W$($J$$$N$G5$$K$7$J$$$3$H$K$7$F!";R%W%m%;%9<B9TCf$Ke(B
SIGINT e$B$,$-$?$i!";R%W%m%;%9$,;`[email protected]$Ke(B Interrupt e$BNc30$,H/@8e(B
e$B$9$k$H$+$O$I$&$G$7$g$&$+!#e(B

e$B$G$b!"e(BC e$B$Ne(B system e$B$r;H$C$F<BAu$9$k$N$OL5M}$+$Je(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