On Wed, 18 Aug 2004, Rando Christensen wrote: > Compiles fine on my mac: thanks! > vivi ~/src/posixlock-0.0.1 % ruby extconf.rb > creating Makefile > vivi ~/src/posixlock-0.0.1 % make > gcc -fno-common -g -Os -pipe -no-cpp-precomp -fno-common > -DHAVE_INTTYPES_H -pipe -pipe -I. > -I/usr/lib/ruby/1.6/powerpc-darwin7.0 -I. -c -o posixlock.o posixlock.c > cc -fno-common -g -Os -pipe -no-cpp-precomp -fno-common > -DHAVE_INTTYPES_H -pipe -pipe -dynamic -bundle -undefined suppress > -flat_namespace -L/usr/lib/ruby/1.6/powerpc-darwin7.0 -L/usr/lib -o > posixlock.bundle posixlock.o -ldl -lobjc > vivi ~/src/posixlock-0.0.1 % sudo make install > posixlock.bundle -> /usr/lib/ruby/1.6/powerpc-darwin7.0/posixlock.bundle > chmod 0755 /usr/lib/ruby/1.6/powerpc-darwin7.0/posixlock.bundle > vivi ~/src/posixlock-0.0.1 % > How should I test it? require 'posixlock' def lock_test pid = Process.pid 42.times do open(__FILE__,'r+'){|f| f.posixlock(File::LOCK_EX) and puts "locked by <#{ pid }>"} end end fork ? lock_test && Process.wait : lock_test it is nice to run this on an nfs mounted file system - but not required... -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================