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

Commit45fe3af

Browse files
committed
If pg_ctl stop fails, print an error message and exit (instead of going out
of our way to ignore the exit status). If this ever really happens, worstcase you will not see the "score" at the bottom of the test run.
1 parent47ed197 commit45fe3af

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.50 2008/11/20 15:03:39 mha Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.51 2008/11/25 11:49:35 petere Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -280,7 +280,14 @@ stop_postmaster(void)
280280
snprintf(buf,sizeof(buf),
281281
SYSTEMQUOTE"\"%s/pg_ctl\" stop -D \"%s/data\" -s -m fast"SYSTEMQUOTE,
282282
bindir,temp_install);
283-
r=system(buf);/* ignore exit status. Store in variable to silence gcc */
283+
r=system(buf);
284+
if (r!=0)
285+
{
286+
fprintf(stderr,_("\n%s: could not stop postmaster: exit code was %d\n"),
287+
progname,r);
288+
exit(2);/* not exit_nicely(), that would be recursive */
289+
}
290+
284291
postmaster_running= false;
285292
}
286293
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp