aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-11-25 11:49:35 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-11-25 11:49:35 +0000
commit45fe3afc04438bd11aee7df0b6cc250ef017d3da (patch)
tree94be755eb7ca3368ec2b4e0b667ab058d808e313 /src
parent47ed197c37c804ef4851458506410deb3ae7c2ea (diff)
downloadpostgresql-45fe3afc04438bd11aee7df0b6cc250ef017d3da.tar.gz
postgresql-45fe3afc04438bd11aee7df0b6cc250ef017d3da.zip
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, worst case you will not see the "score" at the bottom of the test run.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index fc28ab3adab..d063602c7e6 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.50 2008/11/20 15:03:39 mha Exp $
+ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.51 2008/11/25 11:49:35 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -280,7 +280,14 @@ stop_postmaster(void)
snprintf(buf, sizeof(buf),
SYSTEMQUOTE "\"%s/pg_ctl\" stop -D \"%s/data\" -s -m fast" SYSTEMQUOTE,
bindir, temp_install);
- r = system(buf); /* ignore exit status. Store in variable to silence gcc */
+ r = system(buf);
+ if (r != 0)
+ {
+ fprintf(stderr, _("\n%s: could not stop postmaster: exit code was %d\n"),
+ progname, r);
+ exit(2); /* not exit_nicely(), that would be recursive */
+ }
+
postmaster_running = false;
}
}