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

Merge branch 'master' of github.com:mailru/tarantool

parents 1d93a74f 09ee81ad
No related merge requests found
......@@ -405,7 +405,8 @@ create_pid(void)
panic_syserror("ftruncate(`%s')", cfg.pid_file);
}
fprintf(f, "%i\n", getpid());
master_pid = getpid();
fprintf(f, "%i\n", master_pid);
fclose(f);
}
......@@ -451,6 +452,7 @@ tarantool_free(void)
gopt_free(main_opt);
free_proc_title(main_argc, main_argv);
/* unlink pidfile but not in replication process. */
if ((cfg.pid_file != NULL) && (master_pid == getpid()))
unlink(cfg.pid_file);
destroy_tarantool_cfg(&cfg);
......@@ -499,7 +501,6 @@ main(int argc, char **argv)
__libc_stack_end = (void*) &argv;
#endif
master_pid = getpid();
crc32_init();
stat_init();
palloc_init();
......
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