libexplain  1.4.D001
Functions
libexplain/execlp_on_error.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

int explain_execlp_on_error (const char *pathname, const char *arg,...)

Function Documentation

int explain_execlp_on_error ( const char *  pathname,
const char *  arg,
  ... 
)

The explain_execlp_on_error 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.

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:
The value returned by the wrapped execlp(3) system call.
Example:
This function is intended to be used in a fashion similar to the following example:
 explain_execlp_on_error(pathname, arg0, arg1);
 ...cope with error
 ...no need to print error message

Definition at line 33 of file execlp_on_error.c.