]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/dlerror.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / dlerror.3
CommitLineData
75b7da85 1.\" Copyright 1995 Yggdrasil Computing, Incorporated.
616c2730 2.\" and Copyright 2015 Michael Kerrisk <mtk.manpages@gmail.com>
75b7da85
MK
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.\"
4b8c67d9 25.TH DLERROR 3 2017-09-15 "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>
68e4db0a 30.PP
75b7da85 31.B "char *dlerror(void);"
68e4db0a 32.PP
75b7da85
MK
33Link with \fI\-ldl\fP.
34.SH DESCRIPTION
35The
36.BR dlerror ()
aeb4ba76
MK
37function returns a human-readable,
38null-terminated string describing the most recent error
75b7da85
MK
39that occurred from a call to one of the functions in the dlopen API
40since the last call to
41.BR dlerror ().
c72bea43
MK
42The returned string does
43.I not
44include a trailing newline.
847e0d88 45.PP
c85226fe
MK
46.BR dlerror ()
47returns NULL if no errors have occurred since initialization or since
75b7da85
MK
48it was last called.
49.SH VERSIONS
50.BR dlerror ()
51is present in glibc 2.0 and later.
eab0df17
MK
52.SH ATTRIBUTES
53For an explanation of the terms used in this section, see
54.BR attributes (7).
55.TS
56allbox;
57lb lb lb
58l l l.
59Interface Attribute Value
60T{
61.BR dlerror ()
62T} Thread safety MT-Safe
63.TE
75b7da85
MK
64.SH CONFORMING TO
65POSIX.1-2001.
66.SH NOTES
78978ec9
MK
67The message returned by
68.BR dlerror ()
ccbdce6e 69may reside in a statically allocated buffer that is
78978ec9
MK
70overwritten by subsequent
71.BR dlerror ()
72calls.
75b7da85
MK
73.\" .LP
74.\" The string returned by
75.\" .BR dlerror ()
76.\" should not be modified.
77.\" Some systems give the prototype as
78.\" .sp
79.\" .in +5
80.\" .B "const char *dlerror(void);"
81.\" .in
82.SS History
83This function is part of the dlopen API, derived from SunOS.
84.SH EXAMPLE
85See
86.BR dlopen (3).
87.SH SEE ALSO
88.BR dladdr (3),
89.BR dlinfo (3),
90.BR dlopen (3),
91.BR dlsym (3)