Compare commits
3 Commits
0a67082f81
...
0830746bf8
Author | SHA1 | Date |
---|---|---|
|
0830746bf8 | |
|
c3405dcb69 | |
|
13c1e5f129 |
|
@ -26,9 +26,10 @@ module ProcessShared
|
||||||
#
|
#
|
||||||
# Fallback to attempting to load from same directory as this file.
|
# Fallback to attempting to load from same directory as this file.
|
||||||
helper = 'process_shared/posix/helper.' + suffix
|
helper = 'process_shared/posix/helper.' + suffix
|
||||||
fallback_path = File.expand_path(File.dirname(__FILE__))
|
gem_spec = Gem::Specification.find_all.find{|g| g.name == 'process_shared'}
|
||||||
path = $LOAD_PATH.find(fallback_path) do |path|
|
path = gem_spec.extensions_dir
|
||||||
File.exist?(File.join(path, helper))
|
unless path.end_with?(gem_spec.full_name)
|
||||||
|
path = File.join(path, gem_spec.full_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
if defined?(Truffle)
|
if defined?(Truffle)
|
||||||
|
|
|
@ -47,7 +47,7 @@ module ProcessShared
|
||||||
#
|
#
|
||||||
# @return [Proc] a finalizer
|
# @return [Proc] a finalizer
|
||||||
def self.make_finalizer(sem)
|
def self.make_finalizer(sem)
|
||||||
proc { LibC.shm_unlink(sem) }
|
proc { SharedMemory::Foreign.shm_unlink(sem) }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Create a new semaphore with initial value +value+. After
|
# Create a new semaphore with initial value +value+. After
|
||||||
|
|
Loading…
Reference in New Issue