mirror of https://gitlab.com/basile.b/dexed.git
diff, prevent zombie proc + leak
This commit is contained in:
parent
e7ca586d77
commit
40505e9a58
|
@ -35,6 +35,7 @@ begin
|
||||||
inherited create(nil);
|
inherited create(nil);
|
||||||
|
|
||||||
p := TProcess.Create(self);
|
p := TProcess.Create(self);
|
||||||
|
try
|
||||||
p.Executable:= 'diff' + exeExt;
|
p.Executable:= 'diff' + exeExt;
|
||||||
|
|
||||||
lbl.Caption:= 'The file: "' + fname2 + '" has been modified by another program.'
|
lbl.Caption:= 'The file: "' + fname2 + '" has been modified by another program.'
|
||||||
|
@ -57,8 +58,14 @@ begin
|
||||||
finally
|
finally
|
||||||
r.Free;
|
r.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
while p.Running do
|
||||||
|
sleep(1);
|
||||||
end
|
end
|
||||||
else editor.Lines.Add('(The "diff" tool cannot be found)');
|
else editor.Lines.Add('(The "diff" tool cannot be found)');
|
||||||
|
finally
|
||||||
|
p.Free;
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue