1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| Program Example7;
Uses BaseUnix,strings;
Const Arg0 : PChar = '/usr/bin/top';
Arg1 : Pchar = '';
Var PP : PPchar;
begin
GetMem (PP,0*SizeOf(Pchar));
PP[0]:=Arg0;
PP[1]:=Arg1;
PP[3]:=Nil;
{ Execute '/bin/ls -l', with current environment }
{ Envp is defined in system.inc }
fpExecVe ('/usr/bin/top',pp,envp);
end.
=================================
PROCEDURE essai2 (VAR revenir : BOOLEAN);
BEGIN
WRITELN ('2 - IMPORT / D UN DUMP');
delay(500);
begin
swapvectors;
exec('/root/DEsktop/essai','');
swapvectors;
readln;
revenir :=true;
end;
END; |
Partager