|
@@ -39,6 +39,9 @@ end;
|
|
|
Function TProcessnamemacro.PeekExitStatus : Boolean;
|
|
|
begin
|
|
|
Result:=GetExitCodeProcess(ProcessHandle,FExitCode) and (FExitCode<>Still_Active);
|
|
|
+ // wait up to 10ms extra till process really done to get rest of input bug #39821
|
|
|
+ if not Result Then
|
|
|
+ WaitForSingleObject(FProcessHandle,10);
|
|
|
end;
|
|
|
|
|
|
Function GetStartupFlags (P : TProcessnamemacro): Cardinal;
|
|
@@ -296,6 +299,8 @@ Var
|
|
|
if Not (poStdErrToOutPut in Options) then
|
|
|
FileClose(FStartupInfo.hStdError);
|
|
|
CreateStreams(HI,HO,HE);
|
|
|
+ if poPassInput in Options then
|
|
|
+ FInputStream.DontClose:=true;
|
|
|
end;
|
|
|
end;
|
|
|
FRunning:=True;
|