HELPLIB.HLB  —  CRTL  execve
    Passes the name of an image to be activated in a child process.
    This function is nonreentrant.

    Format

      #include  <unistd.h>

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

1  –  Arguments

 file_spec

    The full file specification of a new image to be activated in the
    child process.

 argv

    An array of pointers to null-terminated character strings.
    These strings constitute the argument list available to the new
    process. By convention, argv[0] must point to a string that is
    the same as the new process filename (or its last component).
    argv is terminated by a NULL pointer.

 envp

    An array of strings that specifies the program's environment.
    Each string in envp has the following form:

    name = value

    The name can be one of the following names and the value is a
    null-terminated string to be associated with the name:

    o  HOME-Your login directory

    o  TERM-The type of terminal being used

    o  PATH-The default device and directory

    o  USER-The name of the user who initiated the process

    The last element in envp must be the NULL pointer.

    When the operating system executes the program, it places a copy
    of the current environment vector (envp) in the external variable
    environ.

2  –  Description

    See execl for a description of how the exec functions operate.

3  –  Return Value

    -1                 Indicates failure.
Close Help