>>>>> "l" == llin  <cheempz / gmail.com> writes:

l> A follow-up, for ruby 1.9.0 (2008-03-01 revision 0) [i686-linux].
l> It seems the blocking issue is gone, but now flock'ing with
l> File::LOCK_NB returns 0 regardless of whether the file can be locked.
l> Example irb session below:

 I can't reproduce it

vgs% irb 
irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 1.9.0 (2008-03-05 revision 15693) [i686-linux]"
irb(main):002:0> f = File.new('foo')
=> #<File:foo>
irb(main):003:0> f.flock(File::LOCK_EX)
=> 0
irb(main):004:0> f2 = File.new('foo')
=> #<File:foo>
irb(main):005:0> f2.flock(File::LOCK_EX | File::LOCK_NB)
=> false
irb(main):006:0> f.flock(File::LOCK_UN)
=> 0
irb(main):007:0> f2.flock(File::LOCK_EX)
=> 0
irb(main):008:0> exit
vgs% 


Guy Decoux