Commit a7049b52 authored by Bruce Momjian's avatar Bruce Momjian

Have pg_ctl status always output to stdout, even stopped status, not stderr.

parent 43dc0505
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.43 2004/10/27 17:17:07 momjian Exp $ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.44 2004/10/27 19:44:14 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -767,20 +767,20 @@ do_status(void) ...@@ -767,20 +767,20 @@ do_status(void)
pid = get_pgpid(); pid = get_pgpid();
if (pid == 0) /* no pid file */ if (pid == 0) /* no pid file */
{ {
write_stderr(_("%s: neither postmaster nor postgres running\n"), progname); printf(_("%s: neither postmaster nor postgres running\n"), progname);
exit(1); exit(1);
} }
else if (pid < 0) /* standalone backend */ else if (pid < 0) /* standalone backend */
{ {
pid = -pid; pid = -pid;
fprintf(stdout, _("%s: a standalone backend \"postgres\" is running (PID: %ld)\n"), progname, pid); printf(_("%s: a standalone backend \"postgres\" is running (PID: %ld)\n"), progname, pid);
} }
else else
/* postmaster */ /* postmaster */
{ {
char **optlines; char **optlines;
fprintf(stdout, _("%s: postmaster is running (PID: %ld)\n"), progname, pid); printf(_("%s: postmaster is running (PID: %ld)\n"), progname, pid);
optlines = readfile(postopts_file); optlines = readfile(postopts_file);
if (optlines != NULL) if (optlines != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment