logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

dlerror.3p (3324B)


  1. '\" et
  2. .TH DLERROR "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. dlerror
  12. \(em get diagnostic information
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <dlfcn.h>
  17. .P
  18. char *dlerror(void);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIdlerror\fR()
  23. function shall return a null-terminated character string (with no
  24. trailing
  25. <newline>)
  26. that describes the last error that occurred during dynamic linking
  27. processing. If no dynamic linking errors have occurred since the last
  28. invocation of
  29. \fIdlerror\fR(),
  30. \fIdlerror\fR()
  31. shall return NULL.
  32. Thus, invoking
  33. \fIdlerror\fR()
  34. a second time, immediately following a prior invocation, shall result
  35. in NULL being returned.
  36. .P
  37. It is implementation-defined whether or not the
  38. \fIdlerror\fR()
  39. function is thread-safe. A thread-safe implementation shall return only
  40. errors that occur on the current thread.
  41. .SH "RETURN VALUE"
  42. If successful,
  43. \fIdlerror\fR()
  44. shall return a null-terminated character string; otherwise, NULL
  45. shall be returned.
  46. .P
  47. The application shall not modify the string returned. The returned
  48. pointer might be invalidated or the string content might be overwritten
  49. by a subsequent call to
  50. \fIdlerror\fR()
  51. in the same thread (if
  52. \fIdlerror\fR()
  53. is thread-safe) or in any thread (if
  54. \fIdlerror\fR()
  55. is not thread-safe). The returned pointer might also be
  56. invalidated if the calling thread is terminated.
  57. .SH ERRORS
  58. No errors are defined.
  59. .LP
  60. .IR "The following sections are informative."
  61. .SH EXAMPLES
  62. The following example prints out the last dynamic linking error:
  63. .sp
  64. .RS 4
  65. .nf
  66. \&...
  67. #include <dlfcn.h>
  68. .P
  69. char *errstr;
  70. .P
  71. errstr = dlerror();
  72. if (errstr != NULL)
  73. printf ("A dynamic linking error occurred: (%s)\en", errstr);
  74. \&...
  75. .fi
  76. .P
  77. .RE
  78. .SH "APPLICATION USAGE"
  79. Depending on the application environment with respect to asynchronous
  80. execution events, such as signals or other asynchronous computation
  81. sharing the address space, conforming applications should use a critical
  82. section to retrieve the error pointer and buffer.
  83. .SH RATIONALE
  84. None.
  85. .SH "FUTURE DIRECTIONS"
  86. None.
  87. .SH "SEE ALSO"
  88. .IR "\fIdlclose\fR\^(\|)",
  89. .IR "\fIdlopen\fR\^(\|)",
  90. .IR "\fIdlsym\fR\^(\|)"
  91. .P
  92. The Base Definitions volume of POSIX.1\(hy2017,
  93. .IR "\fB<dlfcn.h>\fP"
  94. .\"
  95. .SH COPYRIGHT
  96. Portions of this text are reprinted and reproduced in electronic form
  97. from IEEE Std 1003.1-2017, Standard for Information Technology
  98. -- Portable Operating System Interface (POSIX), The Open Group Base
  99. Specifications Issue 7, 2018 Edition,
  100. Copyright (C) 2018 by the Institute of
  101. Electrical and Electronics Engineers, Inc and The Open Group.
  102. In the event of any discrepancy between this version and the original IEEE and
  103. The Open Group Standard, the original IEEE and The Open Group Standard
  104. is the referee document. The original Standard can be obtained online at
  105. http://www.opengroup.org/unix/online.html .
  106. .PP
  107. Any typographical or formatting errors that appear
  108. in this page are most likely
  109. to have been introduced during the conversion of the source files to
  110. man page format. To report such errors, see
  111. https://www.kernel.org/doc/man-pages/reporting_bugs.html .