Skip to content
Snippets Groups Projects
Commit ec2c0a59 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Merge branch 'stable'

Conflicts:
	include/lua/fiber.h
	src/box/space.cc
	src/memcached.cc
	src/tarantool.cc
parents 51cfb46f d454e06f
No related merge requests found
......@@ -276,7 +276,6 @@ void
box_init()
{
title("loading");
atexit(box_free);
tuple_format_init();
schema_init();
......
......@@ -277,6 +277,8 @@ space_end_recover()
void
schema_free(void)
{
if (spaces == NULL)
return;
while (mh_size(spaces) > 0) {
mh_int_t i = mh_first(spaces);
......
......@@ -321,12 +321,6 @@ tarantool_uptime(void)
return ev_now() - start_time;
}
void snapshot_exit(int code, void* arg) {
(void)arg;
fflush(NULL);
_exit(code);
}
int
snapshot(void)
{
......@@ -365,7 +359,6 @@ snapshot(void)
* may call exit(), push a top-level handler which will do
* _exit() for us.
*/
on_exit(snapshot_exit, NULL);
snapshot_save(recovery_state, box_snapshot);
exit(EXIT_SUCCESS);
......@@ -528,7 +521,6 @@ signal_init(void)
ev_signal_init(&sigs[3], signal_cb, SIGHUP);
ev_signal_start(&sigs[3]);
atexit(signal_free);
(void) tt_pthread_atfork(NULL, NULL, signal_reset);
}
......@@ -616,6 +608,12 @@ tarantool_lua_free()
void
tarantool_free(void)
{
/* Do nothing in a fork. */
if (getpid() != master_pid)
return;
signal_free();
tarantool_lua_free();
box_free();
recovery_free();
stat_free();
......@@ -858,7 +856,6 @@ main(int argc, char **argv)
say_crit("version %s", tarantool_version());
tarantool_L = tarantool_lua_init();
box_init();
atexit(tarantool_lua_free);
tarantool_lua_load_cfg(tarantool_L, &cfg);
/*
* init iproto before admin:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment