---------- Forwarded message ----------
From: Christian Ruppert via RT <bug-mod_p...@rt.cpan.org>
Date: Fri, Mar 25, 2011 at 9:46 AM
Subject: [rt.cpan.org #66894] Apache::SizeLimit: Linux::Smaps detection broken
To:


Fri Mar 25 12:46:38 2011: Request 66894 was acted upon.
Transaction: Ticket created by idl0r
      Queue: mod_perl
    Subject: Apache::SizeLimit: Linux::Smaps detection broken
  Broken in: 2.0.5
   Severity: Normal
      Owner: Nobody
 Requestors: id...@qasl.de
     Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66894 >


Hey guys,

it looks like the Linux::Smaps detection should be improved to *not* die
if /proc/self/smaps doesn't exist. It's quite easy by just moving the
curly bracket.
Please take a look at my patch where I it has been fixed already.
From 6b1b60546ffca416a65d047a1c0d5d2b610b4dac Mon Sep 17 00:00:00 2001
From: Christian Ruppert <id...@gentoo.org>
Date: Fri, 25 Mar 2011 17:42:54 +0100
Subject: [PATCH] Fix Linux::Smaps detection to *not* die if /proc/self/smaps doesn't exist

---
 lib/Apache/SizeLimit/Core.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/Apache/SizeLimit/Core.pm b/lib/Apache/SizeLimit/Core.pm
index 5942bc8..f2fbac4 100644
--- a/lib/Apache/SizeLimit/Core.pm
+++ b/lib/Apache/SizeLimit/Core.pm
@@ -143,7 +143,7 @@ BEGIN {
 
         *_platform_getppid = \&_linux_getppid;
 
-        if (eval { require Linux::Smaps } && Linux::Smaps->new($$)) {
+        if (eval { require Linux::Smaps && Linux::Smaps->new($$) }) {
             $USE_SMAPS = 1;
             *_platform_check_size = \&_linux_smaps_size_check;
         }
-- 
1.7.3.4

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org

Reply via email to