|
11 | 11 | * Portions Copyright (c) 1996-2006, 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.19 2006/08/01 18:01:36 momjian Exp $ |
| 14 | + * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.20 2006/08/13 20:39:07 tgl Exp $ |
15 | 15 | *
|
16 | 16 | *-------------------------------------------------------------------------
|
17 | 17 | */
|
@@ -1552,9 +1552,25 @@ main(int argc, char *argv[])
|
1552 | 1552 |
|
1553 | 1553 | pg_usleep(1000000L);
|
1554 | 1554 | }
|
1555 |
| -if (i==60) |
| 1555 | +if (i>=60) |
1556 | 1556 | {
|
1557 |
| -fprintf(stderr,_("\n%s: postmaster did not start within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"),progname,outputdir); |
| 1557 | +fprintf(stderr,_("\n%s: postmaster did not respond within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"),progname,outputdir); |
| 1558 | + |
| 1559 | +/* |
| 1560 | + * If we get here, the postmaster is probably wedged somewhere |
| 1561 | + * in startup. Try to kill it ungracefully rather than leaving |
| 1562 | + * a stuck postmaster that might interfere with subsequent test |
| 1563 | + * attempts. |
| 1564 | + * |
| 1565 | + * XXX is there a way to do this on Windows? |
| 1566 | + */ |
| 1567 | +#ifndefWIN32 |
| 1568 | +if (kill(postmaster_pid,SIGKILL)!=0&& |
| 1569 | +errno!=ESRCH) |
| 1570 | +fprintf(stderr,_("\n%s: could not kill failed postmaster: %s\n"), |
| 1571 | +progname,strerror(errno)); |
| 1572 | +#endif |
| 1573 | + |
1558 | 1574 | exit_nicely(2);
|
1559 | 1575 | }
|
1560 | 1576 |
|
|