Cleaning Up on Edit from Perl

Scott Penrose scottp at dd.com.au
Tue Jun 10 23:22:53 CDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Wednesday, Jun 11, 2003, at 09:39 Australia/Melbourne, Stas Bekman  
wrote:
> The mod_perl guide comes to help:
> http://perl.apache.org/docs/1.0/guide/ 
> troubleshooting.html#_warn__child_process_30388_did_not_exit__sending_a 
> nother_SIGHUP
>
> PERL_DESTRUCT_LEVEL=-1 perl my_heavy_destruct_program

On exploring this further I have discovered that this only works for  
mod_perl....

 From perlhack
> if you want to run any of the tests yourself manually using the  
> pureperl or perl.third executables, please note that by default perl  
> does not explicitly cleanup all the memory it has allocated (such as  
> global memory arenas) but instead lets the exit() of the whole program  
> "take care" of such allocations, also known as "global destruction of  
> objects".
>
> There is a way to tell perl to do complete cleanup: set the  
> environment variable PERL_DESTRUCT_LEVEL to a non-zero value. The  
> t/TEST wrapper does set this to 2, and this is what you need to do  
> too, if you don't want to see the "global leaks": For example, for  
> "third-degreed" Perl:
> (Note: the mod_perl apache module uses also this environment variable  
> for its own purposes and extended its semantics. Refer to the mod_perl  
> documentation for more information.)

Note the last part - It seems that mod_perl has extended to support the  
- -1.

For now I am going with the following approach.

	kill 9, $$;

Scott
- -- 
Scott Penrose
Anthropomorphic Personification Expert
http://search.cpan.org/search?author=SCOTT
scott at cpan.org

Dismaimer: While every attempt has been made to make sure that this  
email only contains zeros and ones, there has been no effort made to  
guarantee the quantity or the order.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see http://www.gnupg.org

iD8DBQE+5q6gDCFCcmAm26YRAj0HAKCp4pj3cgGMsfCfoQw/sX9I929MVACfWj7e
hkHM41L2aW5OjC9zN1CbQpY=
=Pf5P
-----END PGP SIGNATURE-----




More information about the Melbourne-pm mailing list