diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-11 15:52:25 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-02-13 13:50:57 +0900 |
commit | 95ab9cd8f453099d7649dc0e0eec55ea891340f5 (patch) | |
tree | 40112b9388663f98ead961974ce17e48c8d54248 /test/ruby | |
parent | 9c07f803db1c20241fa73e91a8a959d6cbb82e8b (diff) | |
download | ruby-95ab9cd8f453099d7649dc0e0eec55ea891340f5.tar.gz |
Restart timer thread even after preparation failed
If the timer thread is left stopped, memory crash or segfault can
happen. [Bug #16624]
Diffstat (limited to 'test/ruby')
-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 e0cb49b8ef..ab723c6f63 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2399,6 +2399,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) |