Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

elf_error(3e) [hpux man page]

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)

Check Out this Related Man Page

elf_errmsg(3ELF)					       ELF Library Functions						  elf_errmsg(3ELF)

NAME
elf_errmsg, elf_errno - error handling SYNOPSIS
cc [ flag ... ] file ... -lelf [ library ... ] #include <libelf.h> const char *elf_errmsg(int err); int elf_errno(void); DESCRIPTION
If an ELF library function fails, a program can call elf_errno() to retrieve the library's internal error number. As a side effect, this function resets the internal error number to 0, which indicates no error. The elf_errmsg() function 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, elf_errmsg() returns a pointer to an appropriate message. This function does not have the side effect of clearing the internal error number. EXAMPLES
Example 1: A sample program of calling the elf_errmsg() function. The following fragment clears the internal error number and checks it later for errors. Unless an error occurs after the first call to elf_errno(), the next call will return 0. (void)elf_errno(); /* processing ... */ while (more_to_do) { if ((err = elf_errno()) != 0) { /* print msg */ msg = elf_errmsg(err); } } ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
elf(3ELF), libelf(3LIB), attributes(5) SunOS 5.10 11 Jul 2001 elf_errmsg(3ELF)
Man Page

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

syncsort error

I am getting the error Syncsort: (INERR) an internal error has occurred (11 in SSTRPHDL) when i run a syncsort. The manual does not give any explanation for this. Could anyone please give what the error is like. Thanks in advance (1 Reply)
Discussion started by: vinod.thayil
1 Replies

2. Programming

how to redirect back to stdout

In my program, I am using library provided by other. In the library, the cout/cerr is redirected to a file (the file path is known). After I call some methods in the library, I get one side-effect --> The cout/cerr in my own program is also directed to the file. So how can I to redirect... (5 Replies)
Discussion started by: princelinux
5 Replies

3. Shell Programming and Scripting

Perl Help

A part of the log reads as follows E err:1242 01/12/2009 connectivity error the database connection failed. number of field entries allocated 20, used 1 DBName=Oracle10g ErrorNumber=10 E err:1892 01/12/2009 connectivity error the database connection failed. number of field... (4 Replies)
Discussion started by: vkca
4 Replies

4. UNIX for Dummies Questions & Answers

error message when use fork with open file

I get this message when I write myshell.c program "VM pagefault:SIGSEGV bad add 0x0 err 0x4 nopage read myshell PM: ciredump signal 11 for 1725 /myshell memory fault (core dumped)" /* RCS information: $Id: myshell.c,v 1.2 2006/04/05 22:46:33 elm Exp $ */ #include <stdio.h> #include <unistd.h>... (1 Reply)
Discussion started by: rosecomp
1 Replies

5. UNIX for Dummies Questions & Answers

Eliminate error message (/dev/null)?

I am trying to eliminate an error message from a script. This is the error message: find: stat() error /usr/openv/netbackup/db/images/KUMAX: No such file or directory if ]; then runthiscommand=`su nxadm -c "ssh -t $new3 exec /bin/sh -s">/tmp/filew3 2>/tmp/error.txt<<EOF ... (1 Reply)
Discussion started by: newbie2010
1 Replies

6. UNIX for Dummies Questions & Answers

Getting Perl err.msg when I login?

Hi, When I login to system. root or any of the user, I get Perl error message. Please advise.... When I login as a user.... I get this err.msg. Terminal type is vt100 You have new mail. bash: /usr/local/bin/perl: cannot execute binary file when I login as root. Terminal type... (2 Replies)
Discussion started by: samnyc
2 Replies