Not that I have any first-hand knowledge in this area, but does't the previous comment about locking a readonly item hold true for $0 as well? If $0 is readonly, wouldn't that also cause the lock to fail?<br><br><div><span class="gmail_quote">
On 12/13/05, <b class="gmail_sendername">jerry gay</b> <<a href="mailto:jerry.gay@gmail.com">jerry.gay@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 12/13/05, jerry gay <<a href="mailto:jerry.gay@gmail.com">jerry.gay@gmail.com</a>> wrote:<br>> i have now had the pleasure of experiencing this scenario. not giving<br>> up on my favorite hack (above,) and finding a reference in my notes to
<br>> it's source, i found and modified a similar locking example that works<br>> on platforms which don't allow exclusive locks on read-only files.<br>><br>> INIT {<br>> open ME => '+<', $0 or die "can't lock";
<br>> flock ME => LOCK_EX | LOCK_NB or exit 1;<br>> }<br>><br>of course, i forgot to provide the source... <a href="http://perl.plover.com/yak/flock/">http://perl.plover.com/yak/flock/</a><br>~jerry<br>_____________________________________________________________
<br>Seattle Perl Users Group Mailing List<br> POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><br>SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list">http://mail.pm.org/mailman/listinfo/spug-list
</a><br> MEETINGS: 3rd Tuesdays, Location: <a href="http://Amazon.com">Amazon.com</a> Pac-Med<br> WEB PAGE: <a href="http://seattleperl.org/">http://seattleperl.org/</a><br></blockquote></div><br><br clear="all"><br>
-- <br>Ben Prew<br><a href="mailto:ben.prew@gmail.com">ben.prew@gmail.com</a>