Everything is in the title really. The man page does not say anything. Some google reports some people checking errno after dlopen, but just few and with various results. The function does return a success/non-success value, but how should one figure out the cause of the failure.
So does dlopen()
set errno? where are the different errno values defined, then?
If not, what should be used to check what caused the failure?
No (emphasis added).
As noted by others, nothing prohibits
dlopen()
(or, more likely, functions thatdlopen()
calls) from modifyingerrno
. But a standard-conformingdlopen()
will not report its own errors througherrno
. You need to calldlerror()
.