This commit is contained in:
rulingcom 2024-03-02 16:17:22 +08:00
parent 4cd4344f13
commit 13c1e5f129
2 changed files with 2 additions and 5 deletions

View File

@ -26,10 +26,7 @@ module ProcessShared
#
# Fallback to attempting to load from same directory as this file.
helper = 'process_shared/posix/helper.' + suffix
fallback_path = File.expand_path(File.dirname(__FILE__))
path = $LOAD_PATH.find(fallback_path) do |path|
File.exist?(File.join(path, helper))
end
path = Gem::Specification.find_all.find{|g| g.name == 'process_shared'}.extensions_dir
if defined?(Truffle)
ffi_lib(File.join(::Truffle::Boot.toolchain_paths(:LD_LIBRARY_PATH), 'libgraalvm-llvm.so.1'), File.join(path, helper))

View File

@ -47,7 +47,7 @@ module ProcessShared
#
# @return [Proc] a finalizer
def self.make_finalizer(sem)
proc { LibC.shm_unlink(sem) }
proc { SharedMemory::Foreign.shm_unlink(sem) }
end
# Create a new semaphore with initial value +value+. After