Skip to content

Commit

Permalink
Changing RTLD_GLOBAL to RTLD_LOCAL when loading the procedural for of…
Browse files Browse the repository at this point in the history
…fsetting unloading at arnold shutdown. (#259)
  • Loading branch information
sebastienblor authored Mar 5, 2020
1 parent 509aa88 commit 4e5175c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions procedural/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ node_loader
* https://github.com/jemalloc/jemalloc/issues/1122
*/
#if defined(_DARWIN) || defined(_LINUX)
const auto result = dlopen(USDLibraryPath().c_str(), RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE);
const auto result = dlopen(USDLibraryPath().c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);
if (!result)
AiMsgWarning("[USD] failed to re-load usd_proc.dylib. Crashes might happen on pre-10.13 OSX systems: %s\n", dlerror());
#endif
Expand Down Expand Up @@ -281,11 +281,6 @@ scene_format_loader
format->name = "USD";
format->description = "Load and write USD files in Arnold";
strcpy(format->version, AI_VERSION);
#if defined(_DARWIN) || defined(_LINUX)
const auto result = dlopen(USDLibraryPath().c_str(), RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE);
if (!result)
AiMsgWarning("[USD] failed to re-load usd_proc.dylib. Crashes might happen on pre-10.13 OSX systems: %s\n", dlerror());
#endif
return true;
}

Expand Down

0 comments on commit 4e5175c

Please sign in to comment.