Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is

  not Fixnum, but exception object.
  This causes test_signal_requiring of test/ruby/test_signal.rb fail
  if the sub process is killed on waiting IO in lex_io_gets in require
  itself, not sleep.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 38d3b013b7733d9ccd66c011d74c00b35bb704c4 1 parent 2f56c64
NARUSE, Yui authored May 11, 2012
8  ChangeLog
... ...
@@ -1,3 +1,11 @@
  1
+Fri May 11 22:54:22 2012  NARUSE, Yui  <naruse@ruby-lang.org>
  2
+
  3
+	* thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is
  4
+	  not Fixnum, but exception object.
  5
+	  This causes test_signal_requiring of test/ruby/test_signal.rb fail
  6
+	  if the sub process is killed on waiting IO in lex_io_gets in require
  7
+	  itself, not sleep.
  8
+
1 9
 Fri May 11 14:23:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>
2 10
 
3 11
 	* parse.y (primary): begin/end block should be isolated from outside.
2  test/ruby/test_signal.rb
@@ -212,7 +212,7 @@ def test_signal_requiring
212 212
     STDOUT.flush
213 213
   end
214 214
 end
215  
-Thread.pass while th.running?
  215
+Thread.pass until th.stop? # this may stop inside lex_io_gets
216 216
 Process.kill(:INT, $$)
217 217
 th.join
218 218
 EOS
2  thread.c
@@ -1300,7 +1300,7 @@ rb_threadptr_execute_interrupts_common(rb_thread_t *th)
1300 1300
 	    thread_debug("rb_thread_execute_interrupts: %"PRIdVALUE"\n", err);
1301 1301
 
1302 1302
 	    if (err == eKillSignal || err == eTerminateSignal) {
1303  
-		th->errinfo = INT2FIX(TAG_FATAL);
  1303
+		th->errinfo = rb_exc_new2(rb_eInterrupt, "");
1304 1304
 		TH_JUMP_TAG(th, TAG_FATAL);
1305 1305
 	    }
1306 1306
 	    else {

0 notes on commit 38d3b01

Please sign in to comment.
Something went wrong with that request. Please try again.