Martijn Laan 1 year ago
parent
commit
65b9a9d379
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Projects/Src/CmnFunc2.pas

+ 3 - 3
Projects/Src/CmnFunc2.pas

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