Pascal / BaseUnix / FpExecve
FpAccess, FpAlarm, FpChdir, FpChmod, FpChown, FpClose, FpClosedir, FpDup, FpDup2, FpExecv, » FpExecve, FpExit, FpFcntl, pfdfillset, fpFD_CLR, fpFD_ISSET, fpFD_SET, fpFD_ZERO, FpFork, FPFStat, FpFtruncate, FpGetcwd, FpGetegid, FpGetEnv, fpgeterrno, FpGeteuid, FpGetgid, FpGetgroups, FpGetpgrp, FpGetpid, FpGetppid, fpGetPriority, FpGetuid, FpIOCtl, FpKill, FpLink, FpLseek, fpLstat, FpMkdir, FpMkfifo, Fpmmap, Fpmunmap, FpNanoSleep, fpNice, FpOpen, FpOpendir, FpPause, FpPipe, FpRead, FpReaddir, fpReadLink, FpRename, FpRmdir, fpSelect, fpseterrno, FpSetgid, fpSetPriority, FpSetsid, fpsettimeofday, FpSetuid,
Funcion: FpExecve()
Sintaxis:
function FpExecve(
 
  path: pChar;
 
  argv: ppChar;
 
  envp: ppChar
 
):cInt;
 
function FpE

Descripcion: Remplaza el programa corriendo actualmente con el programa especificado en path. Este da al programa las opciones en argv, y el ambiente en envp. Ellos son apuntadores a el arreglo y apuntadores a cadenas de caracteres. El ultimo apuntador a esta cadena deberia ser "nil". Si se ejecuta correcamente la funcion, estano retorna valores.

ERRORES:
La informacion de los errores puedes conseguirla en la funcion fpGetErrno, y incluye lo siguiente:

sys_eacces
File is not a regular file, or has no execute permission. A compononent of the path has no search permission.
sys_eperm
The file system is mounted \textit{noexec}.
sys_e2big
Argument list too big.
sys_enoexec
The magic number in the file is incorrect.
sys_enoent
The file does not exist.
sys_enomem
Not enough memory for kernel.
sys_enotdir
A component of the path is not a directory.
sys_eloop
The path contains a circular reference (via symlinks).

Vea tambien
fpExecv, fpFork
Ejemplo:
Program Example7;
 
{ Program to demonstrate the Execve function. }
 
Uses BaseUnix, strings;
 
Const Arg0 : PChar = '/bin/ls';
      Arg1 : Pchar = '-l';
 
Var PP : PPchar;
 
 
begin
  GetMem (PP,3*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 ('/bin/ls',pp,envp);
end.

Librerias Pascal

Libreria crt - CRT - Pantalla y teclado del PASCAL de Turbo que maneja la unidad
Libreria dos - DOS - Interface Turbo Pascal MS-DOS
Libreria Graph - Unidad para manipular los graficos de la pantalla compatible con TP
Libreria Objects - Objetos basicos compatible con TP
Libreria math - Rutinas adicionales matematicas
Libreria Printer - Provee de acceso a la impresora
Libreria strings - Rutinas para el manejo de cadenas
Libreria BaseUnix - Funcionalidad Basica de Linux
Libreria System - Manejo de Archivos - Funciones para la manipulacion de archivos en Pascal