Re: PostgreSQL in Windows console and Ctrl-C - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: PostgreSQL in Windows console and Ctrl-C
Date
Msg-id CAA4eK1Ji-U79HN_bRRXAK_BseVNvWh_Kz2ZSMxUmi2EmRvRirw@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL in Windows console and Ctrl-C  (Bruce Momjian <bruce@momjian.us>)
Responses Re: PostgreSQL in Windows console and Ctrl-C
List pgsql-hackers
On Fri, Apr 11, 2014 at 3:14 AM, Bruce Momjian <bruce@momjian.us> wrote:
>
> Can someone with Windows expertise comment on whether this should be
> applied?

I don't think this is a complete fix, for example what about platform where
_CreateRestrictedToken() is not supported.  For Example, the current
proposed fix will not work for below case:

if (_CreateRestrictedToken == NULL)
{
/*
* NT4 doesn't have CreateRestrictedToken, so just call ordinary
* CreateProcess
*/
write_stderr(_("%s: WARNING: cannot create restricted tokens on this
platform\n"), progname);
if (Advapi32Handle != NULL)
FreeLibrary(Advapi32Handle);
return CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si,
processInfo);
}

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Get more from indices.
Next
From: Rajeev rastogi
Date:
Subject: Re: Autonomous Transaction (WIP)