Fix compiler stuck on waiting C/CPP backends. (#7472)
This commit is contained in:
parent
755570bcfb
commit
0b99e8e8cb
2 changed files with 12 additions and 1 deletions
|
|
@ -494,7 +494,7 @@ when defined(Windows) and not defined(useNimRtl):
|
||||||
sa.nLength = sizeof(SECURITY_ATTRIBUTES).cint
|
sa.nLength = sizeof(SECURITY_ATTRIBUTES).cint
|
||||||
sa.lpSecurityDescriptor = nil
|
sa.lpSecurityDescriptor = nil
|
||||||
sa.bInheritHandle = 1
|
sa.bInheritHandle = 1
|
||||||
if createPipe(rdHandle, wrHandle, sa, 1024) == 0'i32:
|
if createPipe(rdHandle, wrHandle, sa, 0) == 0'i32:
|
||||||
raiseOSError(osLastError())
|
raiseOSError(osLastError())
|
||||||
|
|
||||||
proc fileClose(h: Handle) {.inline.} =
|
proc fileClose(h: Handle) {.inline.} =
|
||||||
|
|
@ -524,6 +524,12 @@ when defined(Windows) and not defined(useNimRtl):
|
||||||
he = ho
|
he = ho
|
||||||
else:
|
else:
|
||||||
createPipeHandles(he, si.hStdError)
|
createPipeHandles(he, si.hStdError)
|
||||||
|
if setHandleInformation(he, DWORD(1), DWORD(0)) == 0'i32:
|
||||||
|
raiseOsError(osLastError())
|
||||||
|
if setHandleInformation(hi, DWORD(1), DWORD(0)) == 0'i32:
|
||||||
|
raiseOsError(osLastError())
|
||||||
|
if setHandleInformation(ho, DWORD(1), DWORD(0)) == 0'i32:
|
||||||
|
raiseOsError(osLastError())
|
||||||
else:
|
else:
|
||||||
createAllPipeHandles(si, hi, ho, he, cast[int](result))
|
createAllPipeHandles(si, hi, ho, he, cast[int](result))
|
||||||
result.inHandle = FileHandle(hi)
|
result.inHandle = FileHandle(hi)
|
||||||
|
|
|
||||||
|
|
@ -704,6 +704,11 @@ proc duplicateHandle*(hSourceProcessHandle: HANDLE, hSourceHandle: HANDLE,
|
||||||
dwDesiredAccess: DWORD, bInheritHandle: WINBOOL,
|
dwDesiredAccess: DWORD, bInheritHandle: WINBOOL,
|
||||||
dwOptions: DWORD): WINBOOL{.stdcall, dynlib: "kernel32",
|
dwOptions: DWORD): WINBOOL{.stdcall, dynlib: "kernel32",
|
||||||
importc: "DuplicateHandle".}
|
importc: "DuplicateHandle".}
|
||||||
|
|
||||||
|
proc setHandleInformation*(hObject: HANDLE, dwMask: DWORD,
|
||||||
|
dwFlags: DWORD): WINBOOL {.stdcall,
|
||||||
|
dynlib: "kernel32", importc: "SetHandleInformation".}
|
||||||
|
|
||||||
proc getCurrentProcess*(): HANDLE{.stdcall, dynlib: "kernel32",
|
proc getCurrentProcess*(): HANDLE{.stdcall, dynlib: "kernel32",
|
||||||
importc: "GetCurrentProcess".}
|
importc: "GetCurrentProcess".}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue