mirror of https://gitlab.com/basile.b/dexed.git
Remove ensureNoPipeIfWait, possible source of wrong report like #459
https://github.com/Basile-z/dexed/issues/459
This commit is contained in:
parent
8e11e89ba0
commit
09d017733d
|
@ -811,7 +811,6 @@ begin
|
||||||
prc.CurrentDirectory := fSymStringExpander.expand(prc.CurrentDirectory)
|
prc.CurrentDirectory := fSymStringExpander.expand(prc.CurrentDirectory)
|
||||||
else
|
else
|
||||||
prc.CurrentDirectory:= chd;
|
prc.CurrentDirectory:= chd;
|
||||||
ensureNoPipeIfWait(prc);
|
|
||||||
prc.Execute;
|
prc.Execute;
|
||||||
while prc.Running do
|
while prc.Running do
|
||||||
if poUsePipes in prc.Options then
|
if poUsePipes in prc.Options then
|
||||||
|
|
|
@ -250,11 +250,6 @@ type
|
||||||
*)
|
*)
|
||||||
procedure killProcess(var process: TAsyncProcess);
|
procedure killProcess(var process: TAsyncProcess);
|
||||||
|
|
||||||
(**
|
|
||||||
* Ensures that the i/o process pipes are not redirected if it waits on exit.
|
|
||||||
*)
|
|
||||||
procedure ensureNoPipeIfWait(process: TProcess);
|
|
||||||
|
|
||||||
(**
|
(**
|
||||||
* Returns true if ExeName is already running.
|
* Returns true if ExeName is already running.
|
||||||
*)
|
*)
|
||||||
|
@ -1081,13 +1076,6 @@ begin
|
||||||
process := nil;
|
process := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ensureNoPipeIfWait(process: TProcess);
|
|
||||||
begin
|
|
||||||
if not (poWaitonExit in process.Options) then
|
|
||||||
exit;
|
|
||||||
process.Options := process.Options - [poStderrToOutPut, poUsePipes];
|
|
||||||
end;
|
|
||||||
|
|
||||||
function getLineEndingLength(const fname: string): byte;
|
function getLineEndingLength(const fname: string): byte;
|
||||||
var
|
var
|
||||||
value: char = #0;
|
value: char = #0;
|
||||||
|
|
|
@ -3171,7 +3171,7 @@ begin
|
||||||
fRunProc := TDexedProcess.Create(nil);
|
fRunProc := TDexedProcess.Create(nil);
|
||||||
if redirect then
|
if redirect then
|
||||||
begin
|
begin
|
||||||
fRunProc.Options := [poStderrToOutPut, poUsePipes];
|
fRunProc.Options := [poStderrToOutPut, poUsePipes, poWaitOnExit];
|
||||||
fRunProc.ShowWindow := swoHIDE;
|
fRunProc.ShowWindow := swoHIDE;
|
||||||
fRunProc.OnReadData := @asyncprocOutput;
|
fRunProc.OnReadData := @asyncprocOutput;
|
||||||
fRunProc.OnTerminate:= @asyncprocTerminate;
|
fRunProc.OnTerminate:= @asyncprocTerminate;
|
||||||
|
|
|
@ -250,7 +250,6 @@ begin
|
||||||
fProcess.Parameters.Text := arg;
|
fProcess.Parameters.Text := arg;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ensureNoPipeIfWait(fProcess);
|
|
||||||
|
|
||||||
if fProcess.Executable.fileExists then
|
if fProcess.Executable.fileExists then
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue