Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita7049b5

Browse files
committed
Have pg_ctl status always output to stdout, even stopped status, not stderr.
1 parent43dc050 commita7049b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.43 2004/10/2717:17:07 momjian Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.44 2004/10/2719:44:14 momjian Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -767,20 +767,20 @@ do_status(void)
767767
pid=get_pgpid();
768768
if (pid==0)/* no pid file */
769769
{
770-
write_stderr(_("%s: neither postmaster nor postgres running\n"),progname);
770+
printf(_("%s: neither postmaster nor postgres running\n"),progname);
771771
exit(1);
772772
}
773773
elseif (pid<0)/* standalone backend */
774774
{
775775
pid=-pid;
776-
fprintf(stdout,_("%s: a standalone backend \"postgres\" is running (PID: %ld)\n"),progname,pid);
776+
printf(_("%s: a standalone backend \"postgres\" is running (PID: %ld)\n"),progname,pid);
777777
}
778778
else
779779
/* postmaster */
780780
{
781781
char**optlines;
782782

783-
fprintf(stdout,_("%s: postmaster is running (PID: %ld)\n"),progname,pid);
783+
printf(_("%s: postmaster is running (PID: %ld)\n"),progname,pid);
784784

785785
optlines=readfile(postopts_file);
786786
if (optlines!=NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp