diff --git a/src/lua/init.cc b/src/lua/init.cc index aa1b11cc6680ffc3f0f66e65319d7acf5a1579d5..fc5619845a94dacdb64dc568133ba1ce249481a6 100644 --- a/src/lua/init.cc +++ b/src/lua/init.cc @@ -67,6 +67,7 @@ struct lua_State *tarantool_L; * The fiber running the startup Lua script */ struct fiber *script_fiber; +bool start_loop = true; /* contents of src/lua/ files */ extern char uuid_lua[], @@ -427,6 +428,7 @@ run_script(va_list ap) lua_getfield(L, -1, "start"); lua_remove(L, -2); /* remove package.loaded.console */ lua_remove(L, -2); /* remove package.loaded */ + start_loop = false; } try { lua_checkstack(L, argc - 1); diff --git a/src/lua/init.h b/src/lua/init.h index 8e0489ea99694808e4e3c97a9e8e899a5b1e461d..d779255195dc807d1ed74067b82c01a6f2c0ad00 100644 --- a/src/lua/init.h +++ b/src/lua/init.h @@ -34,6 +34,7 @@ struct lua_State; struct luaL_Reg; struct tbuf; +extern bool start_loop; /** * This is a callback used by tarantool_lua_init() to open diff --git a/src/tarantool.cc b/src/tarantool.cc index 9c302f2d6df6593ba48e6b51d0a88724a470abfb..1fd1c634ac3da0f262db763bfa84af7934f11278 100644 --- a/src/tarantool.cc +++ b/src/tarantool.cc @@ -75,7 +75,6 @@ int main_argc; /** Signals handled after start as part of the event loop. */ static ev_signal ev_sigs[4]; static const int ev_sig_count = sizeof(ev_sigs)/sizeof(*ev_sigs); -static bool start_loop = true; extern const void *opt_def;