libexplain  1.4.D001
Functions
libexplain/execlp_or_die.c File Reference
#include <libexplain/ac/errno.h>
#include <libexplain/ac/stdarg.h>
#include <libexplain/ac/stdlib.h>
#include <libexplain/ac/unistd.h>
#include <libexplain/buffer/errno/execlp.h>
#include <libexplain/common_message_buffer.h>
#include <libexplain/execlp.h>
#include <libexplain/sizeof.h>
#include <libexplain/string_buffer.h>
#include <libexplain/output.h>

Go to the source code of this file.

Functions

void explain_execlp_or_die (const char *pathname, const char *arg,...)

Function Documentation

void explain_execlp_or_die ( const char *  pathname,
const char *  arg,
  ... 
)

The explain_execlp_or_die function is used to call the execlp(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_execlp(3) function, and then the process terminates by calling exit(EXIT_FAILURE).

Parameters:
pathnameThe pathname, exactly as to be passed to the execlp(3) system call.
argThe argument list, exactly as to be passed to the execvp(3) system call.
Returns:
This function only returns on success, see execlp(3) for more information. On failure, prints an explanation and exits, it does not return.
Example:
This function is intended to be used in a fashion similar to the following example:
 explain_execlp_or_die(pathname, arg0, arg1, NULL);

Definition at line 33 of file execlp_or_die.c.