From: Bill Atkins Date: 2005-01-12T00:21:08+09:00 Subject: Re: Exclusive lock of a file Actually, that should be File::LOCK_EX. On Tue, 11 Jan 2005 10:19:57 -0500, Bill Atkins wrote: > File.open "filename" do |f| > f.flock LOCK_EX > ... > end > > On Wed, 12 Jan 2005 00:11:19 +0900, Sea&Gull wrote: > > Hi! > > > > Could you please give me a hint how in Ruby > > to open a file with exclusive lock? > > > > As I know, in perl it is something like this: > > > > open F, "filename"; > > flock F, 2 > > > > Thanks a lot! > > > > -- > > s&g > > > > > > > -- > $stdout.sync = true > "Just another Ruby hacker.".each_byte do |b| > ('a'..'z').step do|c|print c+"\b";sleep 0.007 end;print b.chr > end; print "\n" > -- $stdout.sync = true "Just another Ruby hacker.".each_byte do |b| ('a'..'z').step do|c|print c+"\b";sleep 0.007 end;print b.chr end; print "\n"