|
11 | 11 | * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group |
12 | 12 | * Portions Copyright (c) 1994, Regents of the University of California |
13 | 13 | * |
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 $ |
15 | 15 | * |
16 | 16 | *------------------------------------------------------------------------- |
17 | 17 | */ |
@@ -280,7 +280,14 @@ stop_postmaster(void) |
280 | 280 | snprintf(buf,sizeof(buf), |
281 | 281 | SYSTEMQUOTE"\"%s/pg_ctl\" stop -D \"%s/data\" -s -m fast"SYSTEMQUOTE, |
282 | 282 | 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 | + |
284 | 291 | postmaster_running= false; |
285 | 292 | } |
286 | 293 | } |
|