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