Subject: Re: [ruby-ffi] Re: Multiple libraries included via dlopen()? |
From: Michael MacDonald |
Date: 12/17/10 10:44 AM |
To: ruby-ffi@googlegroups.com |
You probably don't need to backport all the machinery in ffi_lib_flagsand ffi_lib, you can might get away with using something like:
GlobalSlurm = DynamicLibrary.open(FFI.map_library_name('slurm'),
FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_GLOBAL)
That should re-open the library as global. (storing it in a constant
just keeps the library handle alive, and hence from being closed when
GC is performed).