Martijn Laan 1 年之前
父節點
當前提交
65b9a9d379
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Projects/Src/CmnFunc2.pas

+ 3 - 3
Projects/Src/CmnFunc2.pas

@@ -1611,7 +1611,7 @@ end;
 constructor TCreateProcessOutputReader.Create(const ALogProc: TLogProc;
   const ALogProcData: NativeInt; AMode: TOutputMode = omLog);
 
-  procedure PipeCreate(var Read, Write: THandle; SecurityAttr: TSecurityAttributes);
+  procedure CreatePipeAndSetHandleInformation(var Read, Write: THandle; SecurityAttr: TSecurityAttributes);
   begin
     { CreatePipe docs say no assumptions should be made about the output
       parameter contents (the two handles) when it fails. So specify local
@@ -1659,10 +1659,10 @@ begin
   if NulDevice <> INVALID_HANDLE_VALUE then
     FStdInNulDevice := NulDevice;
 
-  PipeCreate(FStdOutPipeRead, FStdOutPipeWrite, SecurityAttributes);
+  CreatePipeAndSetHandleInformation(FStdOutPipeRead, FStdOutPipeWrite, SecurityAttributes);
 
   if FMode = omCapture then
-    PipeCreate(FStdErrPipeRead, FStdErrPipeWrite, SecurityAttributes);
+    CreatePipeAndSetHandleInformation(FStdErrPipeRead, FStdErrPipeWrite, SecurityAttributes);
 
   FOkToRead := True;
   FMaxTotalBytesToRead := 10*1000*1000;