mirror of https://gitlab.com/basile.b/dexed.git
#336 - onterminate still never called in some cases, call manually
This commit is contained in:
parent
58621ce6dd
commit
e261b0e20c
|
@ -3066,7 +3066,6 @@ begin
|
||||||
begin
|
begin
|
||||||
// back compat, see https://github.com/BBasile/Coedit/issues/276
|
// back compat, see https://github.com/BBasile/Coedit/issues/276
|
||||||
dmdproc.Parameters.Add('-version=runnable_module');
|
dmdproc.Parameters.Add('-version=runnable_module');
|
||||||
|
|
||||||
dmdproc.Parameters.Add('-version=run_single_module');
|
dmdproc.Parameters.Add('-version=run_single_module');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -3090,7 +3089,7 @@ begin
|
||||||
deleteDups(dmdproc.Parameters);
|
deleteDups(dmdproc.Parameters);
|
||||||
dmdproc.Execute;
|
dmdproc.Execute;
|
||||||
while dmdproc.Running do
|
while dmdproc.Running do
|
||||||
application.ProcessMessages;
|
dmdproc.checkTerminated();
|
||||||
if not asObj then
|
if not asObj then
|
||||||
sysutils.DeleteFile(fname + objExt);
|
sysutils.DeleteFile(fname + objExt);
|
||||||
if (dmdProc.ExitStatus = 0) then
|
if (dmdProc.ExitStatus = 0) then
|
||||||
|
@ -3100,8 +3099,8 @@ begin
|
||||||
fDoc, amcEdit, amkInf);
|
fDoc, amcEdit, amkInf);
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
fMsgs.message(format('error: the process (%s) has returned the status %s',
|
(* fMsgs.message(format('error: the process (%s) has returned the status %s',
|
||||||
[dmdproc.Executable, prettyReturnStatus(dmdproc)]), fDoc, amcEdit, amkErr);
|
[dmdproc.Executable, prettyReturnStatus(dmdproc)]), fDoc, amcEdit, amkErr); *)
|
||||||
fMsgs.message(shortenPath(fDoc.fileName, 25) + ' has not been compiled',
|
fMsgs.message(shortenPath(fDoc.fileName, 25) + ' has not been compiled',
|
||||||
fDoc, amcEdit, amkErr);
|
fDoc, amcEdit, amkErr);
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -50,6 +50,7 @@ type
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
procedure execute; override;
|
procedure execute; override;
|
||||||
|
procedure checkTerminated;
|
||||||
// reads TProcess.OUtput in OutputStack
|
// reads TProcess.OUtput in OutputStack
|
||||||
procedure fillOutputStack;
|
procedure fillOutputStack;
|
||||||
// fills list with the full lines contained in OutputStack
|
// fills list with the full lines contained in OutputStack
|
||||||
|
@ -309,6 +310,12 @@ begin
|
||||||
internalDoOnTerminate(self);
|
internalDoOnTerminate(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEProcess.checkTerminated;
|
||||||
|
begin
|
||||||
|
sleep(20);
|
||||||
|
checkTerminated(self);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TCEAutoBufferedProcess.create(aOwner: TComponent);
|
constructor TCEAutoBufferedProcess.create(aOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
Loading…
Reference in New Issue