mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
CPP-20035 debug as root: Report GetLastError in _ReadAndSetEnvVars
GitOrigin-RevId: 9b86abff1fb41159f49e73eaa4ec5f2f8cb99f17
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6ce53ad39c
commit
e9d7997d18
@@ -92,9 +92,10 @@ static void _ReadAndSetEnvVars(DWORD nParentPid, _In_ HANDLE eventSource)
|
||||
|
||||
HANDLE hEnvVarsPipe = CreateFile(sEnvVarsPipeName, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hEnvVarsPipe == INVALID_HANDLE_VALUE) {
|
||||
DWORD nError = GetLastError();
|
||||
ReportEvent(eventSource, EVENTLOG_ERROR_TYPE, 0, ERR_INVALID_HANDLE, NULL, 0, 0, NULL, NULL);
|
||||
fwprintf(stderr, L"Error opening env vars pipe. Exit code %ld", GetLastError());
|
||||
exit(ERR_INVALID_HANDLE);
|
||||
fwprintf(stderr, L"Error opening env vars pipe. Exit code %ld", nError);
|
||||
exit(nError);
|
||||
}
|
||||
|
||||
WCHAR* buf = malloc(_MAX_ENV);
|
||||
|
||||
Reference in New Issue
Block a user