| 128 | #endif |
| 129 | |
| 130 | ModuleLoader::Module* ModuleLoader::loadModule(ISC_STATUS* status, const Firebird::PathName& modPath) |
| 131 | { |
| 132 | void* module = dlopen(modPath.nullStr(), FB_RTLD_MODE); |
| 133 | if (module == NULL) |
| 134 | { |
| 135 | makeErrorStatus(status, dlerror()); |
| 136 | return 0; |
| 137 | } |
| 138 | |
| 139 | #ifdef DEBUG_THREAD_IN_UNLOADED_LIBRARY |
| 140 | Firebird::string command; |
| 141 | command.printf("echo +++ %s +++ >>/tmp/fbmaps;date >> /tmp/fbmaps;cat /proc/%d/maps >>/tmp/fbmaps", |
| 142 | modPath.c_str(), getpid()); |
| 143 | system(command.c_str()); |
| 144 | #endif |
| 145 | |
| 146 | Firebird::PathName linkPath = modPath; |
| 147 | char b[PATH_MAX]; |
| 148 | const char* newPath = realpath(modPath.c_str(), b); |
| 149 | if (newPath) |
| 150 | linkPath = newPath; |
| 151 | |
| 152 | return FB_NEW_POOL(*getDefaultMemoryPool()) DlfcnModule(*getDefaultMemoryPool(), linkPath, module); |
| 153 | } |
| 154 | |
| 155 | DlfcnModule::DlfcnModule(MemoryPool& pool, const Firebird::PathName& aFileName, void* m) |
| 156 | : ModuleLoader::Module(pool, aFileName), |
nothing calls this directly
no test coverage detected