|
4 | 4 | * |
5 | 5 | * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group |
6 | 6 | * |
7 | | - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.89 2007/11/15 21:14:41 momjian Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.90 2007/11/20 19:24:26 momjian Exp $ |
8 | 8 | * |
9 | 9 | *------------------------------------------------------------------------- |
10 | 10 | */ |
@@ -77,10 +77,11 @@ typedef enum |
77 | 77 | RUN_AS_SERVICE_COMMAND |
78 | 78 | }CtlCommand; |
79 | 79 |
|
| 80 | +#defineDEFAULT_WAIT60 |
80 | 81 |
|
81 | 82 | staticbooldo_wait= false; |
82 | 83 | staticboolwait_set= false; |
83 | | -staticintwait_seconds=60; |
| 84 | +staticintwait_seconds=DEFAULT_WAIT; |
84 | 85 | staticboolsilent_mode= false; |
85 | 86 | staticShutdownModeshutdown_mode=SMART_MODE; |
86 | 87 | staticintsig=SIGTERM;/* default */ |
@@ -1031,6 +1032,10 @@ pgwin32_CommandLine(bool registration) |
1031 | 1032 | if (registration&&do_wait) |
1032 | 1033 | strcat(cmdLine," -w"); |
1033 | 1034 |
|
| 1035 | +if (registration&&wait_seconds!=DEFAULT_WAIT) |
| 1036 | +/* concatenate */ |
| 1037 | +sprintf(cmdLine+strlen(cmdLine)," -t %d",wait_seconds); |
| 1038 | + |
1034 | 1039 | if (post_opts) |
1035 | 1040 | { |
1036 | 1041 | strcat(cmdLine," "); |
@@ -1472,7 +1477,8 @@ do_help(void) |
1472 | 1477 | printf(_("Usage:\n")); |
1473 | 1478 | printf(_(" %s start [-w] [-t SECS] [-D DATADIR] [-s] [-l FILENAME] [-o \"OPTIONS\"]\n"),progname); |
1474 | 1479 | printf(_(" %s stop [-W] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n"),progname); |
1475 | | -printf(_(" %s restart [-w] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n [-o \"OPTIONS\"]\n"),progname); |
| 1480 | +printf(_(" %s restart [-w] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n" |
| 1481 | +" [-o \"OPTIONS\"]\n"),progname); |
1476 | 1482 | printf(_(" %s reload [-D DATADIR] [-s]\n"),progname); |
1477 | 1483 | printf(_(" %s status [-D DATADIR]\n"),progname); |
1478 | 1484 | printf(_(" %s kill SIGNALNAME PID\n"),progname); |
|