]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/dlerror.3
ldd.1, sprof.1, accept.2, alarm.2, bind.2, chdir.2, clock_nanosleep.2, close.2, conne...
[thirdparty/man-pages.git] / man3 / dlerror.3
CommitLineData
75b7da85
MK
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.\"
460495ca 25.TH DLERROR 3 2015-08-08 "Linux" "Linux Programmer's Manual"
75b7da85
MK
26.SH NAME
27dlerror \- 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
33Link with \fI\-ldl\fP.
34.SH DESCRIPTION
35The
36.BR dlerror ()
37function returns a human-readable string describing the most recent error
38that occurred from a call to one of the functions in the dlopen API
39since the last call to
40.BR dlerror ().
c72bea43
MK
41The returned string does
42.I not
43include a trailing newline.
c85226fe
MK
44
45.BR dlerror ()
46returns NULL if no errors have occurred since initialization or since
75b7da85
MK
47it was last called.
48.SH VERSIONS
49.BR dlerror ()
50is present in glibc 2.0 and later.
eab0df17
MK
51.SH ATTRIBUTES
52For an explanation of the terms used in this section, see
53.BR attributes (7).
54.TS
55allbox;
56lb lb lb
57l l l.
58Interface Attribute Value
59T{
60.BR dlerror ()
61T} Thread safety MT-Safe
62.TE
75b7da85
MK
63.SH CONFORMING TO
64POSIX.1-2001.
65.SH NOTES
78978ec9
MK
66The message returned by
67.BR dlerror ()
68may reside in a staticially allocated buffer that is
69overwritten by subsequent
70.BR dlerror ()
71calls.
75b7da85
MK
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
82This function is part of the dlopen API, derived from SunOS.
83.SH EXAMPLE
84See
85.BR dlopen (3).
86.SH SEE ALSO
87.BR dladdr (3),
88.BR dlinfo (3),
89.BR dlopen (3),
90.BR dlsym (3)