L
Ludwigi Beethoven
I am writing a ruby appl under AIX where I need to
update the /etc/hosts table. I would like to make sure
that during my update nobody else can update that
file. I thought I found a solution to my problem with
the flock method. However, it does not appear to do
what I thought it will do. To test it, I wrote a
simple ruby piece of code that, first locks the file,
second spin-loop forever while I open another window
and vi the "locked" file. Well, I am able to vi and
change the file that is supposed to be locked.
ruby -v returns: ruby 1.6.7 (2002-03-01)
[powerpc-aix4.3.3.0]
Any ideas??
Thank you
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
update the /etc/hosts table. I would like to make sure
that during my update nobody else can update that
file. I thought I found a solution to my problem with
the flock method. However, it does not appear to do
what I thought it will do. To test it, I wrote a
simple ruby piece of code that, first locks the file,
second spin-loop forever while I open another window
and vi the "locked" file. Well, I am able to vi and
change the file that is supposed to be locked.
ruby -v returns: ruby 1.6.7 (2002-03-01)
[powerpc-aix4.3.3.0]
Any ideas??
Thank you
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com