mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-03 06:07:37 +01:00
* cleanup of previous stuff
git-svn-id: trunk@5619 -
This commit is contained in:
parent
39b718f62a
commit
a21e39ae16
@ -248,7 +248,7 @@ Var
|
|||||||
FEnv : PPChar;
|
FEnv : PPChar;
|
||||||
Argv : PPChar;
|
Argv : PPChar;
|
||||||
fd : Integer;
|
fd : Integer;
|
||||||
PName,p2 : String;
|
PName : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If (poUsePipes in FProcessOptions) then
|
If (poUsePipes in FProcessOptions) then
|
||||||
@ -271,16 +271,13 @@ begin
|
|||||||
PName:=CommandLine;
|
PName:=CommandLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not FileExists(PName) then
|
if not FileExists(PName) then begin
|
||||||
P2 := FileSearch(Pname,fpgetenv('PATH'))
|
PName := FileSearch(Pname,fpgetenv('PATH'));
|
||||||
else
|
|
||||||
P2 := PName;
|
if Length(PName) = 0 then
|
||||||
|
raise EProcess.CreateFmt(SErrNoSuchProgram,[PName]);
|
||||||
If (P2='') then
|
end;
|
||||||
Raise EProcess.CreateFmt(SErrNoSuchProgram,[PName])
|
|
||||||
else
|
|
||||||
PName:=P2;
|
|
||||||
|
|
||||||
Pid:=fpfork;
|
Pid:=fpfork;
|
||||||
if Pid<0 then
|
if Pid<0 then
|
||||||
Raise EProcess.Create('Failed to Fork process');
|
Raise EProcess.Create('Failed to Fork process');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user