To: | mjd-perl-tiefile+ [...] plover.com |
From: | "Victor A. Rodriguez" <victor [...] bit-man.com.ar> |
Subject: | flock() + offset = bug ?? |
Date: | Tue, 15 Jun 2004 01:30:09 -0200 |
Hello,
I began using Tie::File some time ago (v0.93, nice work indeed), and jumped
to v0.96 recently. The e-mail reader I use, and develop, refused to work
with 0.96, and after some work on it I discovered that if the tied array
(@a) is used before the flock() call, then it will be cleared although the
file will suffer no modifications at all. No matter what I did it remains
empty after it (more precisely only the first line can be accessed AND
'print "@a";' will show a value of '0'). If no access to the array was done
previous to the flock() everything will be fine.
I have attached the lock test (#14) modified to test these conditions (test
#3, #5 and #6), and it fails only in v0.95 and v0.96 (the ones that have
the offset and cache cleaning in flock). I tested them on Mac OS X
10.3.4/perl v5.8.1-RC3 built for darwin-thread-multi-2level and OpenBSD
3.4/perl v5.8.0 built for i386-openbsd.
I'm not sure if this is a bug or a misunderstunding of mine about the
flock() use.In case it's a bug just let me know how can I help you ... I
know, the answer is to build a patch, but first I prefer to know if there's
some sillyness coming from me.
Thanks for the time devoted to read this e-mail.
--
Victor A. Rodriguez (Bit-Man)
El bit Fantasma (http://www.bit-man.com.ar)