Skip to content

Commit 619fd24

Browse files
authored
Revert "[Libdl] Use RTLD_NOLOAD when calling dlpath(::String) (#39676)" (#40271)
This reverts commit 514426d.
1 parent ba10fae commit 619fd24

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

base/libdl.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,10 @@ julia> dlpath("libjulia")
237237
```
238238
"""
239239
function dlpath(libname::Union{AbstractString, Symbol})
240-
dlopen(libname, RTLD_NOLOAD) do handle
241-
return dlpath(handle)
242-
end
240+
handle = dlopen(libname)
241+
path = dlpath(handle)
242+
dlclose(handle)
243+
return path
243244
end
244245

245246
if Sys.isapple()

0 commit comments

Comments
 (0)