diff --git a/tests/utils/redir.pp b/tests/utils/redir.pp index d490aa878e..7938b928ab 100644 --- a/tests/utils/redir.pp +++ b/tests/utils/redir.pp @@ -1093,12 +1093,17 @@ begin P.InheritHandles:=(execinheritshandles in flags); P.Execute; +{$ifdef VER3_0} {$ifdef Windows} WaitForSingleObject(P.ProcessHandle,max_count); counter:=max_count; {$else not Windows} counter:=0; {$endif not Windows} +{$else} + P.WaitForExit(max_count); + counter:=max_count; +{$endif} while P.Running do begin