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

Commit7e6ec04

Browse files
committed
Support silent mode for service registrations on win32
Using -s when registering a service will now suppressthe application eventlog entries stating that the serviceis starting and started.MauMau
1 parent1710752 commit7e6ec04

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎doc/src/sgml/ref/pg_ctl-ref.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ PostgreSQL documentation
117117
</arg>
118118
<arg>-w</arg>
119119
<arg>-t <replaceable>seconds</replaceable></arg>
120+
<arg>-s</arg>
120121
<arg>-o <replaceable>options</replaceable></arg>
121122
</cmdsynopsis>
122123

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ write_eventlog(int level, const char *line)
163163
{
164164
staticHANDLEevtHandle=INVALID_HANDLE_VALUE;
165165

166+
if (silent_mode&&level==EVENTLOG_INFORMATION_TYPE)
167+
return;
168+
166169
if (evtHandle==INVALID_HANDLE_VALUE)
167170
{
168171
evtHandle=RegisterEventSource(NULL,"PostgreSQL");
@@ -1276,6 +1279,9 @@ pgwin32_CommandLine(bool registration)
12761279
/* concatenate */
12771280
sprintf(cmdLine+strlen(cmdLine)," -t %d",wait_seconds);
12781281

1282+
if (registration&&silent_mode)
1283+
strcat(cmdLine," -s");
1284+
12791285
if (post_opts)
12801286
{
12811287
strcat(cmdLine," ");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp