]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/dlerror.3
splice.2: EAGAIN can occur when called on nonblocking file descriptors
[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 2017-09-15 "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 .PP
31 .B "char *dlerror(void);"
32 .PP
33 Link with \fI\-ldl\fP.
34 .SH DESCRIPTION
35 The
36 .BR dlerror ()
37 function returns a human-readable,
38 null-terminated string describing the most recent error
39 that occurred from a call to one of the functions in the dlopen API
40 since the last call to
41 .BR dlerror ().
42 The returned string does
43 .I not
44 include a trailing newline.
45 .PP
46 .BR dlerror ()
47 returns NULL if no errors have occurred since initialization or since
48 it was last called.
49 .SH VERSIONS
50 .BR dlerror ()
51 is present in glibc 2.0 and later.
52 .SH ATTRIBUTES
53 For an explanation of the terms used in this section, see
54 .BR attributes (7).
55 .TS
56 allbox;
57 lb lb lb
58 l l l.
59 Interface Attribute Value
60 T{
61 .BR dlerror ()
62 T} Thread safety MT-Safe
63 .TE
64 .SH CONFORMING TO
65 POSIX.1-2001.
66 .SH NOTES
67 The message returned by
68 .BR dlerror ()
69 may reside in a statically allocated buffer that is
70 overwritten by subsequent
71 .BR dlerror ()
72 calls.
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
83 This function is part of the dlopen API, derived from SunOS.
84 .SH EXAMPLE
85 See
86 .BR dlopen (3).
87 .SH SEE ALSO
88 .BR dladdr (3),
89 .BR dlinfo (3),
90 .BR dlopen (3),
91 .BR dlsym (3)