The UNIX Operating System

TOP

UP


Ray Seyfarth

ORCA


Computer Science

COST

USM




Using execve to Execute a New Program in UNIX


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

  • int execl( const char *path, const char *arg, ...);

  • int execlp( const char *file, const char *arg, ...);

  • int execle( const char *path, const char *arg , ..., char * const envp[]);

  • int execv( const char *path, char *const argv[]);

  • int execvp( const char *file, char *const argv[]);

  • exec.. execute a new program (same process id)

  • The first argument is the new program
    if it says path, it requires a full pathname
    otherwise, it searches in the path

  • Program arguments follow as a list or a vector

  • execve and execle allow specifying the environment


University of Southern Mississippi
Ray.Seyfarth@usm.edu
Updated 20:05 Jun 5, 2000