mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 20:39:24 +02:00
* Patch from Martin to set FCloseHandleOnExecute before invoking OnGetHandle - the handler might change it
This commit is contained in:
parent
8c8b336914
commit
299c90b91d
@ -1180,6 +1180,7 @@ begin
|
||||
begin
|
||||
FTheirHandleIOType := IOType;
|
||||
FOurHandle:=THAndle(INVALID_HANDLE_VALUE);
|
||||
FCloseHandleOnExecute:=(IOType<>iotDefault);
|
||||
Case IOType of
|
||||
iotDefault : H:=CreateStandardHandle;
|
||||
iotPipe : H:=CreatePipeHandle;
|
||||
@ -1188,7 +1189,6 @@ begin
|
||||
iotHandle : H:=CreateCustomHandle;
|
||||
iotNull : H:=CreateNullFileHandle;
|
||||
end;
|
||||
FCloseHandleOnExecute:=(IOType<>iotDefault);
|
||||
FTheirHandle:=PrepareCreatedHandleForProcess(H);
|
||||
if Assigned(FAfterAllocateHandle) then
|
||||
FAfterAllocateHandle(Self,FTheirHandle,FCloseHandleOnExecute);
|
||||
|
Loading…
Reference in New Issue
Block a user