>> Sat Feb 16 11:11:48 2008: Request 33303 was acted upon.
>> Transaction: Ticket created by [EMAIL PROTECTED]
>> PROBLEM:
>> If I turn off USE_SMAPS (i.e. set Apache::SizeLimit::USE_SMAPS=0), I get
>> an
>> error, specifically:
> Here is my suggested set of patches to fix these issues, with an
> additional test that demonstrated the failure, and success with the code
> updates.
Any thoughts on this solution? I would need to update the mp2 components
also, but if this approach looks reasonable I can commit these changes.
> Index: t/response/TestApache/basic.pm
> ===================================================================
> --- t/response/TestApache/basic.pm (revision 628377)
> +++ t/response/TestApache/basic.pm (working copy)
> @@ -15,7 +15,7 @@
> sub handler {
> my $r = shift;
>
> - plan $r, tests => 12;
> + plan $r, tests => 13;
>
> ok( ! Apache::SizeLimit->_limits_are_exceeded(),
> 'check that _limits_are_exceeded() returns false without any
> limits set' );
> @@ -24,6 +24,16 @@
> my ( $size, $shared ) = Apache::SizeLimit->_check_size();
> cmp_ok( $size, '>', 0, 'proc size is reported > 0' );
>
> + {
> + # test with USE_SMAPS=0
> + my $smaps = $Apache::SizeLimit::USE_SMAPS;
> + $Apache::SizeLimit::USE_SMAPS = 0;
> + my ( $size, $shared ) = Apache::SizeLimit->_check_size();
> + cmp_ok( $size, '>', 0, 'proc size is reported > 0' );
> + $Apache::SizeLimit::USE_SMAPS = $smaps;
> + }
> +
> +
> SKIP:
> {
> skip 'I have no idea what getppid() on Win32 might return', 1
> Index: lib/Apache/SizeLimit.pm
> ===================================================================
> --- lib/Apache/SizeLimit.pm (revision 628377)
> +++ lib/Apache/SizeLimit.pm (working copy)
> @@ -32,6 +32,9 @@
> $MIN_SHARE_SIZE
> $CHECK_EVERY_N_REQUESTS
> $START_TIME
> + $USE_SMAPS
> + $VERSION
> + $REQUEST_COUNT
> );
> use vars qw(@ISA);
> @ISA = qw(Apache::SizeLimit::Core);
> Index: lib/Apache/SizeLimit/Core.pm
> ===================================================================
> --- lib/Apache/SizeLimit/Core.pm (revision 628377)
> +++ lib/Apache/SizeLimit/Core.pm (working copy)
> @@ -38,6 +38,9 @@
> @ISA = qw(Exporter);
>
> @EXPORT_OK = qw(
> + $VERSION
> + $REQUEST_COUNT
> + $USE_SMAPS
> $MAX_PROCESS_SIZE
> $MAX_UNSHARED_SIZE
> $MIN_SHARE_SIZE
> @@ -111,8 +114,10 @@
> }
>
> sub _check_size {
> - my ($size, $share) = _platform_check_size();
> + my $class = shift;
>
> + my ($size, $share) = $class->_platform_check_size();
> +
> return ($size, $share, $size - $share);
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]