Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (e) execlp(2)
NAME
execlp - Executes a file using a filename, a set of argument strings, and **environ
LIBRARY
G-series native OSS processes: /G/system/sysnn/zossksrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll
SYNOPSIS
#include <unistd.h>
extern char ∗∗environ;
int execlp(
const char file,
const char arg, ...);
PARAMETERS
**environ Points to an array of character pointers to environment strings. The environment
strings define the OSS environment for the new process. The environ array is
terminated by a null pointer.
The **environ array of the new process is also passed as the env[]array in the
call to the main() function of the new process. Refer to Entering the New Pro-
cess later in this reference page.
file Identifies the new process image file. If this parameter
Starts with a slash (/) character, then it contains the absolute pathname.
Does not start with a slash but does contain a slash, then the pathname
resolves relative to the current working directory.
Contains no slash, the system searches the directories listed in the PATH
environment variable for the file and prefixes the directory in which it is
found.
arg Points to a null-terminated string containing an argument to be made visible to
the main function of the new program. The first such argument should point to
the null-terminated string containing the filename of the new process image. The
last of these arguments must be a null pointer.
These strings constitute the argument list available to the new process image.
DESCRIPTION
The execlp() function is one of the exec set of functions. The exec set of functions replace the
current process image with a new process image. The new image is constructed from a regular
executable file, called a new process image file. The new process image file is formatted as an
executable text or binary file in one of the formats recognized by the exec set of functions.
A successful execlp() function call does not return, because the calling process image is overlaid
by the new process image.
527186-023 Hewlett-Packard Company 219