summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-22 10:42:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-22 10:42:09 +0000
commit46c64caff68dd536eeeaa1c945eb66b886a0721d (patch)
treec247176796312d6ad96189884c555bdbacef224d /test
parent224172757ea4e9fb8f1d406b8e056d564cb9b517 (diff)
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')
-rw-r--r--test/ruby/test_process.rb12
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