lua: patch os.exit() to execute on_shutdown triggers.
Make os.exit() call tarantool_exit(), just like the signal handler does. Now on_shutdown triggers are not run only when a fatal signal is received. Closes #1607 @TarantoolBot document Title: Document box.ctl.on_shutdown triggers on_shutdown triggers may be set similar to space:on_replace triggers: ``` box.ctl.on_shutdown(new_trigger, old_trigger) ``` The triggers will be run when tarantool exits due to receiving one of the signals: `SIGTERM`, `SIGINT`, `SIGHUP` or when user executes `os.exit()`. Note that the triggers will not be run if tarantool receives a fatal signal: `SIGSEGV`, `SIGABORT` or any signal causing immediate program termination.
Showing
- extra/exports 1 addition, 0 deletionsextra/exports
- src/lua/init.lua 12 additions, 0 deletionssrc/lua/init.lua
- src/main.cc 7 additions, 5 deletionssrc/main.cc
- src/main.h 3 additions, 0 deletionssrc/main.h
- test/box/misc.result 89 additions, 0 deletionstest/box/misc.result
- test/box/misc.test.lua 30 additions, 0 deletionstest/box/misc.test.lua
Loading
Please register or sign in to comment