Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
f6445b02
Commit
f6445b02
authored
Oct 11, 2011
by
Jelte Jansen
Browse files
[master] python nested dlopen fix
parent
911cb21f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/python/isc/datasrc/__init__.py
View file @
f6445b02
import
sys
import
os
# The datasource factory loader uses dlopen, as does python
# for its modules. Some dynamic linkers do not play nice if
# modules are not loaded with RTLD_GLOBAL, a symptom of which
# is that exceptions are not recognized by type. So to make
# sure this doesn't happen, we temporarily set RTLD_GLOBAL
# during the loading of the datasource wrappers.
import
ctypes
flags
=
sys
.
getdlopenflags
()
sys
.
setdlopenflags
(
flags
|
ctypes
.
RTLD_GLOBAL
)
# this setup is a temporary workaround to deal with the problem of
# having both 'normal' python modules and a wrapper module
# Once all programs use the new interface, we should remove the
...
...
@@ -16,6 +26,10 @@ if intree:
from
datasrc
import
*
else
:
from
isc.datasrc.datasrc
import
*
# revert to the default dlopen flags
sys
.
setdlopenflags
(
flags
)
from
isc.datasrc.sqlite3_ds
import
*
from
isc.datasrc.master
import
*
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment