From f24b0abff231f9c40267a49d0736b0129c68dcf8 Mon Sep 17 00:00:00 2001 From: Pavel Cherenkov <pcherenkov@gmail.com> Date: Mon, 14 May 2012 18:29:59 +0400 Subject: [PATCH] bug993476: master_pid is set from create_pid (i.e. from the correct process) --- src/tarantool.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tarantool.m b/src/tarantool.m index b9a397193e..7017a7c63d 100644 --- a/src/tarantool.m +++ b/src/tarantool.m @@ -404,7 +404,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); } @@ -498,7 +499,6 @@ main(int argc, char **argv) __libc_stack_end = (void*) &argv; #endif - master_pid = getpid(); crc32_init(); stat_init(); palloc_init(); -- GitLab