Browse Source

* Patch from Martin to rename iotNone to iotDefault.

Martin Frb 1 year ago
parent
commit
54157a17c6

+ 1 - 1
packages/fcl-process/src/process.pp

@@ -60,7 +60,7 @@ Type
   TProcessForkEvent = procedure(Sender : TObject) of object;
   TProcessForkEvent = procedure(Sender : TObject) of object;
   {$endif UNIX}
   {$endif UNIX}
 
 
-  TIOType = (iotNone, iotPipe, iotFile, iotHandle, iotProcess, iotNull);
+  TIOType = (iotDefault, iotPipe, iotFile, iotHandle, iotProcess, iotNull);
   TProcessHandleType = (phtInput,phtOutput,phtError);
   TProcessHandleType = (phtInput,phtOutput,phtError);
 
 
   TGetHandleEvent = procedure(Sender : TObject; var aHandle : THandle; var CloseOnExecute : Boolean) of object;
   TGetHandleEvent = procedure(Sender : TObject; var aHandle : THandle; var CloseOnExecute : Boolean) of object;

+ 5 - 5
packages/fcl-process/src/processbody.inc

@@ -577,9 +577,9 @@ begin
     for HT in TProcessHandleType do
     for HT in TProcessHandleType do
       FDescriptors[HT].IOType:=iotPipe;
       FDescriptors[HT].IOType:=iotPipe;
   if poStderrToOutPut in FProcessOptions then
   if poStderrToOutPut in FProcessOptions then
-    FDescriptors[phtError].IOType:=iotNone;
+    FDescriptors[phtError].IOType:=iotDefault;
   if poPassInput in FProcessOptions then
   if poPassInput in FProcessOptions then
-    FDescriptors[phtInput].IOType:=iotNone;
+    FDescriptors[phtInput].IOType:=iotDefault;
 end;
 end;
 
 
 procedure TProcess.SetActive(const Value: Boolean);
 procedure TProcess.SetActive(const Value: Boolean);
@@ -1080,7 +1080,7 @@ var
 begin
 begin
   if Not FHandleValid then
   if Not FHandleValid then
      exit;
      exit;
-  If (FTheirHandleIOType=iotNone) or not (CloseHandleOnExecute or aForceClose) then
+  If (FTheirHandleIOType=iotDefault) or not (CloseHandleOnExecute or aForceClose) then
     begin
     begin
     FTheirHandle:=THandle(INVALID_HANDLE_VALUE);
     FTheirHandle:=THandle(INVALID_HANDLE_VALUE);
      exit;
      exit;
@@ -1130,14 +1130,14 @@ begin
     FTheirHandleIOType := IOType;
     FTheirHandleIOType := IOType;
     FOurHandle:=THAndle(INVALID_HANDLE_VALUE);
     FOurHandle:=THAndle(INVALID_HANDLE_VALUE);
     Case IOType of
     Case IOType of
-      iotNone : H:=CreateStandardHandle;
+      iotDefault : H:=CreateStandardHandle;
       iotPipe : H:=CreatePipeHandle;
       iotPipe : H:=CreatePipeHandle;
       iotFile : H:=CreateFileNameHandle;
       iotFile : H:=CreateFileNameHandle;
       iotProcess : H:=CreateProcessHandle;
       iotProcess : H:=CreateProcessHandle;
       iotHandle : H:=CreateCustomHandle;
       iotHandle : H:=CreateCustomHandle;
       iotNull : H:=CreateNullFileHandle;
       iotNull : H:=CreateNullFileHandle;
     end;
     end;
-    FCloseHandleOnExecute:=(IOType<>iotNone);
+    FCloseHandleOnExecute:=(IOType<>iotDefault);
     FTheirHandle:=PrepareCreatedHandleForProcess(H);
     FTheirHandle:=PrepareCreatedHandleForProcess(H);
     if Assigned(FAfterAllocateHandle) then
     if Assigned(FAfterAllocateHandle) then
       FAfterAllocateHandle(Self,FTheirHandle,FCloseHandleOnExecute);
       FAfterAllocateHandle(Self,FTheirHandle,FCloseHandleOnExecute);

+ 1 - 1
packages/fcl-process/src/win/process.inc

@@ -345,7 +345,7 @@ var
   Res : Boolean;
   Res : Boolean;
   
   
 begin
 begin
-  if IOType in [iotNone,iotFile] then begin
+  if IOType in [iotDefault,iotFile] then begin
     Result:=aHandle;
     Result:=aHandle;
     exit;
     exit;
   end;
   end;