]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/dlerror.3
getauxval.3: wfix
[thirdparty/man-pages.git] / man3 / dlerror.3
1 .\" Copyright 1995 Yggdrasil Computing, Incorporated.
2 .\" and Copyright 2015 Michael Kerrisk (mtk.manpages@gmail.com).
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" %%%LICENSE_END
24 .\"
25 .TH DLERROR 3 2015-08-08 "Linux" "Linux Programmer's Manual"
26 .SH NAME
27 dlerror \- obtain error diagnostic for functions in the dlopen API
28 .SH SYNOPSIS
29 .B #include <dlfcn.h>
30 .sp
31 .B "char *dlerror(void);"
32 .sp
33 Link with \fI\-ldl\fP.
34 .SH DESCRIPTION
35 The
36 .BR dlerror ()
37 function returns a human-readable string describing the most recent error
38 that occurred from a call to one of the functions in the dlopen API
39 since the last call to
40 .BR dlerror ().
41 The returned string does
42 .I not
43 include a trailing newline.
44
45 .BR dlerror ()
46 returns NULL if no errors have occurred since initialization or since
47 it was last called.
48 .SH VERSIONS
49 .BR dlerror ()
50 is present in glibc 2.0 and later.
51 .SH ATTRIBUTES
52 For an explanation of the terms used in this section, see
53 .BR attributes (7).
54 .TS
55 allbox;
56 lb lb lb
57 l l l.
58 Interface Attribute Value
59 T{
60 .BR dlerror ()
61 T} Thread safety MT-Safe
62 .TE
63 .SH CONFORMING TO
64 POSIX.1-2001.
65 .SH NOTES
66 The message returned by
67 .BR dlerror ()
68 may reside in a staticially allocated buffer that is
69 overwritten by subsequent
70 .BR dlerror ()
71 calls.
72 .\" .LP
73 .\" The string returned by
74 .\" .BR dlerror ()
75 .\" should not be modified.
76 .\" Some systems give the prototype as
77 .\" .sp
78 .\" .in +5
79 .\" .B "const char *dlerror(void);"
80 .\" .in
81 .SS History
82 This function is part of the dlopen API, derived from SunOS.
83 .SH EXAMPLE
84 See
85 .BR dlopen (3).
86 .SH SEE ALSO
87 .BR dladdr (3),
88 .BR dlinfo (3),
89 .BR dlopen (3),
90 .BR dlsym (3)