hpux man page for elf_errmsg

Query: elf_errmsg

OS: hpux

Section: 3e

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

elf_error(3E)															     elf_error(3E)

NAME
elf_errmsg, elf_errno - error handling
SYNOPSIS
[flag... ] file... [library] ...
DESCRIPTION
If an ELF library function fails, a program may call to retrieve the library's internal error number. As a side effect, this function resets the internal error number to zero, which indicates no error. takes an error number, err, and returns a null-terminated error message (with no trailing new-line) that describes the problem. A zero err retrieves a message for the most recent error. If no error has occurred, the return value is a null pointer (not a pointer to the null string). Using err of -1 also retrieves the most recent error, except it guarantees a non-null return value, even when no error has occurred. If no message is available for the given number, returns a pointer to an appropriate message. This function does not have the side effect of clearing the internal error number.
EXAMPLES
The following fragment clears the internal error number and checks it later for errors. Unless an error occurs after the first call to the next call will return zero. (void)elf_errno(); while (more_to_do) { /* processing ... */ if ((err = elf_errno()) != 0) { msg = elf_errmsg(err); /* print msg */ } }
SEE ALSO
elf(3E), elf_version(3E). elf_error(3E)
Related Man Pages
elf_errno(3elf) - opensolaris
elf_errmsg(3e) - hpux
elf_errno(3elf) - linux
elf_errmsg(3elf) - v7
elf_errmsg(3elf) - minix
Similar Topics in the Unix Linux Community
syncsort error
how to redirect back to stdout
Perl Help
error message when use fork with open file
Eliminate error message (/dev/null)?