diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-21 07:41:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-21 07:41:41 +0200 |
commit | 95d45be7eace49f7ea57ad89ed084ce7f3c84741 (patch) | |
tree | aee9bb4d7156519cbb859c418ef627f9fbebb59d /opentrack/plugin-support.cpp | |
parent | ba0cd4a1fd743a7d0d025ca76c211c8f466e6879 (diff) |
RTLD_NOW for easier debug on Unix; bail on empty dlopen(3) filenames
Diffstat (limited to 'opentrack/plugin-support.cpp')
-rw-r--r-- | opentrack/plugin-support.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/opentrack/plugin-support.cpp b/opentrack/plugin-support.cpp index fe593bc4..1c95f808 100644 --- a/opentrack/plugin-support.cpp +++ b/opentrack/plugin-support.cpp @@ -120,6 +120,10 @@ dylib::dylib(const QString& filename, Type t) : Constructor(nullptr), Meta(nullptr) { + // otherwise dlopen opens the calling executable + if (filename.size() == 0) + return; + this->filename = filename; #if defined(_WIN32) QString fullPath = QCoreApplication::applicationDirPath() + "/" + this->filename; @@ -156,7 +160,7 @@ dylib::dylib(const QString& filename, Type t) : QByteArray latin1 = QFile::encodeName(filename); handle = dlopen(latin1.constData(), RTLD_NOW | # ifdef __linux - RTLD_DEEPBIND + RTLD_DEEPBIND|RTLD_LOCAL|RTLD_NOW # elif defined(__APPLE__) RTLD_LOCAL|RTLD_FIRST|RTLD_NOW # else |