diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-22 10:42:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-22 10:42:09 +0000 |
commit | 9513b3d9b59f274164820b95cd3b4e954c490f9e (patch) | |
tree | c247176796312d6ad96189884c555bdbacef224d /test/ruby/test_process.rb | |
parent | 20ece37e8fa30ea84c27010c970e8b14e658f1d1 (diff) | |
download | ruby-9513b3d9b59f274164820b95cd3b4e954c490f9e.tar.gz |
process.c: do not discard status
* process.c (rb_spawn_process): do not discard global escape
status. [ruby-core:69304] [Bug #11166]
* process.c (rb_execarg_spawn): extract the start procedure in a
parent process with ensuring the end procedure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r-- | test/ruby/test_process.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index ac5091b278..a43dcf475c 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2017,4 +2017,16 @@ EOS status = th.value assert status.success?, status.inspect end if defined?(fork) + + def test_kill_at_spawn_failure + bug11166 = '[ruby-core:69304] [Bug #11166]' + th = nil + x = with_tmpchdir {|d| + prog = "#{d}/notexist" + th = Thread.start {system(prog);sleep} + th.kill + th.join(0.1) + } + assert_equal(th, x) + end if defined?(fork) end |