bugfix mogilefs: defend $/

Andreas J. Koenig andreas.koenig.gmwojprw at franz.ak.mind.de
Fri Apr 21 19:19:34 UTC 2006


The following bugfix guards against externally influenced $/. In our
case, somebody (not @danga :) had set $/ to undef and so the
application was hanging forever.


--- /tmp/MogileFS.pm at 1.78	2006-04-21 21:11:11.000000000 +0200
+++ /tmp/MogileFS.pm	2006-04-21 21:11:11.000000000 +0200
@@ -846,6 +846,7 @@
         return _fail("socket never became readable");
     }
 
+    local $/ = "\n";
     my $line = <$sock>;
     _debug("RESPONSE: $line");
     return _fail("socket closed on read")



Enjoy,
-- 
andreas


More information about the mogilefs mailing list