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

Commit09a98e6

Browse files
committed
Fix pg_ctl -t to register -t value, per Alvaro.
1 parent9eced00 commit09a98e6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
*
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 $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -77,10 +77,11 @@ typedef enum
7777
RUN_AS_SERVICE_COMMAND
7878
}CtlCommand;
7979

80+
#defineDEFAULT_WAIT60
8081

8182
staticbooldo_wait= false;
8283
staticboolwait_set= false;
83-
staticintwait_seconds=60;
84+
staticintwait_seconds=DEFAULT_WAIT;
8485
staticboolsilent_mode= false;
8586
staticShutdownModeshutdown_mode=SMART_MODE;
8687
staticintsig=SIGTERM;/* default */
@@ -1031,6 +1032,10 @@ pgwin32_CommandLine(bool registration)
10311032
if (registration&&do_wait)
10321033
strcat(cmdLine," -w");
10331034

1035+
if (registration&&wait_seconds!=DEFAULT_WAIT)
1036+
/* concatenate */
1037+
sprintf(cmdLine+strlen(cmdLine)," -t %d",wait_seconds);
1038+
10341039
if (post_opts)
10351040
{
10361041
strcat(cmdLine," ");
@@ -1472,7 +1477,8 @@ do_help(void)
14721477
printf(_("Usage:\n"));
14731478
printf(_(" %s start [-w] [-t SECS] [-D DATADIR] [-s] [-l FILENAME] [-o \"OPTIONS\"]\n"),progname);
14741479
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);
14761482
printf(_(" %s reload [-D DATADIR] [-s]\n"),progname);
14771483
printf(_(" %s status [-D DATADIR]\n"),progname);
14781484
printf(_(" %s kill SIGNALNAME PID\n"),progname);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp