!6342 增加stop完成判断

Merge pull request !6342 from 刘展峰/do_stop
This commit is contained in:
opengauss_bot
2024-09-27 06:56:21 +00:00
committed by Gitee

View File

@ -1905,12 +1905,11 @@ static void do_stop(bool force)
print_msg(_("waiting for server to shut down..."));
for (cnt = 0; cnt < wait_seconds; cnt++) {
if (((pid = get_pgpid()) != 0) ||
(postmaster_is_alive((pid_t)tpid) && IsMyPostmasterPid((pid_t)tpid, pg_config))) {
print_msg(".");
pg_usleep(1000000); /* 1 sec */
} else
if (!(postmaster_is_alive((pid_t)tpid) && IsMyPostmasterPid((pid_t)tpid, pg_config)))
break;
print_msg(".");
pg_usleep(1000000);
}
if ((pid = get_pgpid()) != 0) { /* pid file still exists */