* Patch from Martin to rename iotNone to iotDefault.

This commit is contained in:
Martin Frb 2024-02-04 10:10:11 +01:00 committed by Michaël Van Canneyt
parent ac6dc582be
commit 54157a17c6
3 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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