mirror of https://gitlab.com/basile.b/dexed.git
added another TProcess util to ce_common
This commit is contained in:
parent
afabbb1b45
commit
dc2db7676b
|
@ -189,6 +189,11 @@ type
|
||||||
*)
|
*)
|
||||||
procedure killProcess(var aProcess: TAsyncProcess);
|
procedure killProcess(var aProcess: TAsyncProcess);
|
||||||
|
|
||||||
|
(**
|
||||||
|
* Ensures that the in/out process pipes are not redirected, that it has a console, if it waits on exit.
|
||||||
|
*)
|
||||||
|
procedure ensureNoPipeIfWait(const aProcess: TProcess);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
// https://stackoverflow.com/questions/25438091/objectbinarytotext-error-with-a-treader-twriter-helper-class
|
// https://stackoverflow.com/questions/25438091/objectbinarytotext-error-with-a-treader-twriter-helper-class
|
||||||
|
@ -712,6 +717,15 @@ begin
|
||||||
aProcess := nil;
|
aProcess := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure ensureNoPipeIfWait(const aProcess: TProcess);
|
||||||
|
begin
|
||||||
|
if not (poWaitonExit in aProcess.Options) then
|
||||||
|
exit;
|
||||||
|
//
|
||||||
|
aProcess.Options := aProcess.Options - [poStderrToOutPut, poUsePipes];
|
||||||
|
aProcess.Options := aProcess.Options + [poNewConsole];
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
RegisterClasses([TMRUList, TMRUFileList]);
|
RegisterClasses([TMRUList, TMRUFileList]);
|
||||||
DExtList := TStringList.Create;
|
DExtList := TStringList.Create;
|
||||||
|
|
Loading…
Reference in New Issue