diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-11 15:52:25 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-11 15:55:10 +0900 |
commit | de3883e7823c89ce90d7661ef5bb3b7eb60968db (patch) | |
tree | 45e1cf0487be4a6d514eb59e37542f1805c72748 /test | |
parent | f905f694ccc1f97c77af78d8d7881aa7c9ddabd3 (diff) | |
download | ruby-de3883e7823c89ce90d7661ef5bb3b7eb60968db.tar.gz |
Restart timer thread even after preparation failed
If the timer thread is left stopped, memory crash or segfault can
happen.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 115c33a078..53599a6318 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2397,6 +2397,15 @@ EOS r.close if r end if defined?(fork) + def test_rescue_exec_fail + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + assert_raise(Errno::ENOENT) do + exec("", in: "") + end + end; + end + def test_many_args bug11418 = '[ruby-core:70251] [Bug #11418]' assert_in_out_err([], <<-"end;", ["x"]*256, [], bug11418, timeout: 60) |