|
@@ -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);
|