Execve

Execve

Execve

Execve es una llamada al sistema del sistema operativo UNIX, estandarizada en el estándar POSIX y otros.

Su prototipo es el siguiente (en lenguaje de programación C):

    int execve (const char *filename, const char *argv [], const char *envp[]);   

execve ejecuta el programa indicado por filename. filename debe ser un binario ejecutable, o bien un guión shell (shell script) comenzando con una línea de la forma "#! intérprete [arg]" (conocida como shebang). En el segundo caso, el intérprete debe ser un nombre de camino válido para un ejecutable que no sea él mismo un guión y que será ejecutado con los argumentos [arg] (opcionales) más el archivo filename a interpretar.

argv es un array de cadenas de argumentos pasados al nuevo programa. envp es un array de cadenas, convencionalmente de la forma clave=valor, que se pasan como entorno al nuevo programa. Tanto argv como envp deben terminar en un puntero nulo. El vector de argumentos y el entorno pueden ser accedidos por la función "main" del programa invocado cuando se define como int main(int argc, char *argv[], char *envp[]).

execve no regresa en caso de éxito, y el segmento de código, segmento de datos, BSS y la pila del proceso invocador se sobreescriben con los correspondientes del programa cargado. El programa invocado hereda el PID del proceso invocador y cualquier descriptor de fichero abierto que no se hubiera configurado para "cerrar en ejecución" (close on exec). Las señales pendientes del proceso invocador se limpian. Cualquier señal capturada por el proceso invocador es devuelta a su comportamiento por defecto.

Obtenido de "Execve"

Wikimedia foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Mira otros diccionarios:

  • Shellcode — Una shellcode es un conjunto de órdenes programadas generalmente en lenguaje ensamblador y trasladadas a opcodes que suelen ser inyectadas en la pila (o stack) de ejecución de un programa para conseguir que la máquina en la que reside se ejecute… …   Wikipedia Español

  • Exec (operating system) — The exec functions of Unix like operating systems are a collection of functions that causes the running process to be completely replaced by the program passed as argument to the function. As a new process is not created, the process ID (PID)… …   Wikipedia

  • Path (variable) — PATH is an environment variable on Unix like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH… …   Wikipedia

  • Shellcode — ist ein Begriff aus der Software Programmierung und bezeichnet die in Opcodes umgewandelte Form von Assemblersprachenbefehlen, die einen oder mehrere bestimmte Befehle ausführen soll. In der Regel wird eine Shell gestartet, daher auch der Name.… …   Deutsch Wikipedia

  • Fork bomb — The concept behind the fork bomb – the processes recursively fork until a denial of service or a crash occurs In computing, the fork bomb is a form of denial of service attack against a computer system which makes use of the fork operation (or… …   Wikipedia

  • Fork (operating system) — In computing, when a process forks, it creates a copy of itself, which is called a child process. The original process is then called the parent process . More generally, a fork in a multithreading environment means that a thread of execution is… …   Wikipedia

  • Loader (computing) — In computing, a loader is the part of an operating system that is responsible for loading programs from executables (i.e., executable files) into memory, preparing them for execution and then executing them. The loader is usually a part of the… …   Wikipedia

  • UPX — Infobox Software name = UPX the Ultimate Packer for eXecutables caption = collapsible = author = developer = released = May 26, 1998 latest release version = 3.03 latest release date = April 27, 2008 latest preview version = latest preview date …   Wikipedia

  • Shebang (Unix) — In computing, a shebang (also called a hashbang, hashpling, or pound bang) refers to the characters #! when they are the first two characters in a script file. Unix like operating systems take the presence of these two characters as an indication …   Wikipedia

  • Code audit — A software code audit is a comprehensive analysis of source code in a programming project with the intent of discovering bugs, security breaches or violations of programming conventions. It is an integral part of the defensive programming… …   Wikipedia

Compartir el artículo y extractos

Link directo
Do a right-click on the link above
and select “Copy Link”