aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_ctl/pg_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_ctl/pg_ctl.c')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index dd78e5bc660..ef58883a5c2 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -1896,17 +1896,8 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
/* Verify that we found all functions */
if (_IsProcessInJob == NULL || _CreateJobObject == NULL || _SetInformationJobObject == NULL || _AssignProcessToJobObject == NULL || _QueryInformationJobObject == NULL)
{
- /*
- * IsProcessInJob() is not available on < WinXP, so there is no need
- * to log the error every time in that case
- */
- if (IsWindowsXPOrGreater())
-
- /*
- * Log error if we can't get version, or if we're on WinXP/2003 or
- * newer
- */
- write_stderr(_("%s: WARNING: could not locate all job object functions in system API\n"), progname);
+ /* Log error if we can't get version */
+ write_stderr(_("%s: WARNING: could not locate all job object functions in system API\n"), progname);
}
else
{
@@ -1946,19 +1937,6 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
JOB_OBJECT_UILIMIT_EXITWINDOWS | JOB_OBJECT_UILIMIT_READCLIPBOARD |
JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS | JOB_OBJECT_UILIMIT_WRITECLIPBOARD;
- if (as_service)
- {
- if (!IsWindows7OrGreater())
- {
- /*
- * On Windows 7 (and presumably later),
- * JOB_OBJECT_UILIMIT_HANDLES prevents us from
- * starting as a service. So we only enable it on
- * Vista and earlier (version <= 6.0)
- */
- uiRestrictions.UIRestrictionsClass |= JOB_OBJECT_UILIMIT_HANDLES;
- }
- }
_SetInformationJobObject(job, JobObjectBasicUIRestrictions, &uiRestrictions, sizeof(uiRestrictions));
securityLimit.SecurityLimitFlags = JOB_OBJECT_SECURITY_NO_ADMIN | JOB_OBJECT_SECURITY_ONLY_TOKEN;