main: run an event loop for on_shutdown triggers
When Tarantool is stopped by Ctrl+D or by reaching the end of the script, run_script_f() breaks the event loop, then tarantool_exit() is called from main(), however the fibers that execute on_shutdown triggers can not be longer scheduled, because the event loop is already stopped. Fix this by starting an auxiliary event loop for such cases. Closes #7434 NO_DOC=bugfix (cherry picked from commit cdd5674c)
Showing
- changelogs/unreleased/gh-7434-yield-in-on_shutdown-trigger.md 4 additions, 0 deletions...gelogs/unreleased/gh-7434-yield-in-on_shutdown-trigger.md
- src/main.cc 15 additions, 4 deletionssrc/main.cc
- test/box-luatest/gh_7434_child.lua 38 additions, 0 deletionstest/box-luatest/gh_7434_child.lua
- test/box-luatest/gh_7434_yield_in_on_shutdown_trigger_test.lua 94 additions, 0 deletions...box-luatest/gh_7434_yield_in_on_shutdown_trigger_test.lua
Loading
Please register or sign in to comment