mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:29:39 +02:00
+ return exit code of executed program
git-svn-id: trunk@33219 -
This commit is contained in:
parent
8b81ce7e25
commit
f780872069
@ -4,6 +4,7 @@ var
|
|||||||
i : longint;
|
i : longint;
|
||||||
ps : ansistring;
|
ps : ansistring;
|
||||||
sticks : int64;
|
sticks : int64;
|
||||||
|
ProcessExitCode : Integer;
|
||||||
begin
|
begin
|
||||||
ps:='';
|
ps:='';
|
||||||
if paramcount>0 then
|
if paramcount>0 then
|
||||||
@ -11,7 +12,8 @@ begin
|
|||||||
for i:=2 to paramcount do
|
for i:=2 to paramcount do
|
||||||
ps:=ps+' "'+paramstr(i)+'"';
|
ps:=ps+' "'+paramstr(i)+'"';
|
||||||
sticks:=GetMicroSTicks;
|
sticks:=GetMicroSTicks;
|
||||||
ExecuteProcess(paramstr(1),ps);
|
ProcessExitCode:=ExecuteProcess(paramstr(1),ps);
|
||||||
writeln(stderr,(GetMicroSTicks-sticks)/1000:0:3,' ms');
|
writeln(stderr,(GetMicroSTicks-sticks)/1000:0:3,' ms');
|
||||||
|
halt(ProcessExitCode);
|
||||||
end;
|
end;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user