mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 09:29:28 +01:00
* additional fixes for ExecuteProcess - running of DOS programs in current directory and proper closing of the created queue
git-svn-id: trunk@19323 -
This commit is contained in:
parent
ceecda9d2e
commit
f13c5fae05
@ -669,7 +669,13 @@ begin
|
|||||||
FillChar (SD, SizeOf (SD), 0);
|
FillChar (SD, SizeOf (SD), 0);
|
||||||
SD.Length := SizeOf (SD);
|
SD.Length := SizeOf (SD);
|
||||||
SD.Related := ssf_Related_Child;
|
SD.Related := ssf_Related_Child;
|
||||||
SD.PgmName := PChar (Path);
|
if FileExists (Path) then
|
||||||
|
(* Full path necessary for starting different executable files from current *)
|
||||||
|
(* directory. *)
|
||||||
|
CommandLine := ExpandFileName (Path)
|
||||||
|
else
|
||||||
|
CommandLine := Path;
|
||||||
|
SD.PgmName := PChar (CommandLine);
|
||||||
if ComLine <> '' then
|
if ComLine <> '' then
|
||||||
SD.PgmInputs := PChar (ComLine);
|
SD.PgmInputs := PChar (ComLine);
|
||||||
SD.InheritOpt := ssf_InhertOpt_Parent;
|
SD.InheritOpt := ssf_InhertOpt_Parent;
|
||||||
@ -694,7 +700,9 @@ begin
|
|||||||
DosCloseQueue (HQ);
|
DosCloseQueue (HQ);
|
||||||
DosFreeMem (PCI);
|
DosFreeMem (PCI);
|
||||||
FreeMem (ObjNameBuf, ObjBufSize);
|
FreeMem (ObjNameBuf, ObjBufSize);
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
DosCloseQueue (HQ);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
DosCloseQueue (HQ);
|
DosCloseQueue (HQ);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user