summaryrefslogtreecommitdiff
path: root/src/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin.cpp')
-rw-r--r--src/plugin.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 2dabcbd..16dfa7d 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -154,7 +154,12 @@ dlloaderLoadPlugin (CompPlugin *p,
return false;
}
- dlhand = dlopen (file.c_str (), RTLD_LAZY | RTLD_GLOBAL);
+ int open_flags = RTLD_LAZY | RTLD_GLOBAL;
+#ifdef DEBUG
+ // Do not unload the library during dlclose.
+ open_flags |= RTLD_NODELETE;
+#endif
+ dlhand = dlopen (file.c_str (), open_flags);
if (dlhand)
{
PluginGetInfoProc getInfo;