Skip to content

Commit fe4ad61

Browse files
authored
Fix the return code when stop the node that is started by pg_autoctl (#572)
When the node is not started by pg_autoctl, the pid file doesn't exist, so pg_autoctl raises an error(calls log_fatal(...)). But log_fatal() is not a no-return function, it finally returns 0 to its parent process.
1 parent 8be3d7c commit fe4ad61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/pg_autoctl/cli_service.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ cli_service_stop(int argc, char **argv)
418418
{
419419
log_fatal("Failed to read the keeper's PID at \"%s\"",
420420
keeper.config.pathnames.pid);
421+
exit(EXIT_CODE_INTERNAL_ERROR);
421422
}
422423
}
423424

0 commit comments

Comments
 (0)