summaryrefslogtreecommitdiffstats
path: root/upstream/debian-bookworm/man3/dlerror.3
blob: a492216395af1147042eabce31c917fbfc2951ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
'\" t
.\" Copyright 1995 Yggdrasil Computing, Incorporated.
.\" and Copyright 2015 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.TH dlerror 3 2022-12-15 "Linux man-pages 6.03"
.SH NAME
dlerror \- obtain error diagnostic for functions in the dlopen API
.SH LIBRARY
Dynamic linking library
.RI ( libdl ", " \-ldl )
.SH SYNOPSIS
.nf
.B #include <dlfcn.h>
.PP
.B "char *dlerror(void);"
.fi
.SH DESCRIPTION
The
.BR dlerror ()
function returns a human-readable,
null-terminated string describing the most recent error
that occurred from a call to one of the functions in the dlopen API
since the last call to
.BR dlerror ().
The returned string does
.I not
include a trailing newline.
.PP
.BR dlerror ()
returns NULL if no errors have occurred since initialization or since
it was last called.
.SH VERSIONS
.BR dlerror ()
is present in glibc 2.0 and later.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.ad l
.nh
.TS
allbox;
lbx lb lb
l l l.
Interface	Attribute	Value
T{
.BR dlerror ()
T}	Thread safety	MT-Safe
.TE
.hy
.ad
.sp 1
.SH STANDARDS
POSIX.1-2001.
.SH NOTES
The message returned by
.BR dlerror ()
may reside in a statically allocated buffer that is
overwritten by subsequent
.BR dlerror ()
calls.
.\" .LP
.\" The string returned by
.\" .BR dlerror ()
.\" should not be modified.
.\" Some systems give the prototype as
.\" .sp
.\" .in +5
.\" .B "const char *dlerror(void);"
.\" .in
.SS History
This function is part of the dlopen API, derived from SunOS.
.SH EXAMPLES
See
.BR dlopen (3).
.SH SEE ALSO
.BR dladdr (3),
.BR dlinfo (3),
.BR dlopen (3),
.BR dlsym (3)