mirror of https://gitlab.com/basile.b/dexed.git
fix, prevented a custom tool to freeze
when two incompatible options are activated
This commit is contained in:
parent
b429c8a46d
commit
8c7f6cc270
|
@ -196,11 +196,10 @@ type
|
|||
procedure killProcess(var aProcess: TCheckedAsyncProcess);
|
||||
|
||||
(**
|
||||
* Ensures that the in/out process pipes are not redirected, that it has a console, if it waits on exit.
|
||||
* Ensures that the i/o process pipes are not redirected if it waits on exit.
|
||||
*)
|
||||
procedure ensureNoPipeIfWait(aProcess: TProcess);
|
||||
|
||||
|
||||
(**
|
||||
* Returns true if Exename is running under Windows or Linux
|
||||
*)
|
||||
|
@ -853,9 +852,7 @@ procedure ensureNoPipeIfWait(aProcess: TProcess);
|
|||
begin
|
||||
if not (poWaitonExit in aProcess.Options) then
|
||||
exit;
|
||||
//
|
||||
aProcess.Options := aProcess.Options - [poStderrToOutPut, poUsePipes];
|
||||
aProcess.Options := aProcess.Options + [poNewConsole];
|
||||
end;
|
||||
|
||||
function getLineEndingLength(const aFilename: string): byte;
|
||||
|
|
|
@ -621,7 +621,6 @@ begin
|
|||
ensureNoPipeIfWait(process);
|
||||
process.Execute;
|
||||
while process.Running do
|
||||
if not (poWaitOnExit in process.Options) then
|
||||
if poUsePipes in process.Options then
|
||||
runProcOutput(process);
|
||||
finally
|
||||
|
|
|
@ -177,6 +177,7 @@ begin
|
|||
end;
|
||||
for i:= 0 to fParameters.Count-1 do
|
||||
fProcess.Parameters.AddText(symbolExpander.get(fParameters.Strings[i]));
|
||||
ensureNoPipeIfWait(fProcess);
|
||||
fProcess.Execute;
|
||||
end;
|
||||
|
||||
|
|
Loading…
Reference in New Issue