perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@pobox.com>
Subject Re: speaking of $SIG{__DIE__}
Date Wed, 01 Mar 2000 07:28:00 GMT
On Wed, 23 Feb 2000, Bill Moseley wrote:

> Apache::RegistryNG script:  mod_perl-1.21 Apache 1.3.11 Solaris 2.6 perl
> 5.00503
> 
> I though this a bit interesting:
> 
> I use a $SIG{__DIE__} handler that prints a nice message and then calls exit.
> 
> One thing I noticed that if I use CGI.pm to write that nice message that
> the Apache child dies after calling exit.  If I just use print() (with
> PerlSendHeader on) it works fine and the Apache child lives on to serve
> another request.
> 
> Seems to do the same thing with $SIG{__WARN__}.
> 
> This is error_log
> panic: POPSTACK
> Callback called exit.
> 
> #!/usr/local/bin/perl5.00503 -wT
> use strict;
> 
> use CGI;
> use Apache;
> 
> $SIG{__DIE__} =
>     sub {
>         print CGI::header(),
> #        print "Content-type: text/plain\n\n",        
>         "Child $$\n";
>         Apache->exit;

why do you call Apache->exit here?  try removing it.

>     };
> 
> die;
> 
> 
> Bill Moseley
> mailto:moseley@hank.org
> 


Mime
View raw message