Mailing List Archive

svn commit: r373015 - /perl/modperl/docs/trunk/src/docs/2.0/devel/debug/perl.pod
Author: stas
Date: Fri Jan 27 14:45:28 2006
New Revision: 373015

URL: http://svn.apache.org/viewcvs?rev=373015&view=rev
Log:
how to install SIGUSR2 under mp2

Modified:
perl/modperl/docs/trunk/src/docs/2.0/devel/debug/perl.pod

Modified: perl/modperl/docs/trunk/src/docs/2.0/devel/debug/perl.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/devel/debug/perl.pod?rev=373015&r1=373014&r2=373015&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/devel/debug/perl.pod (original)
+++ perl/modperl/docs/trunk/src/docs/2.0/devel/debug/perl.pod Fri Jan 27 14:45:28 2006
@@ -6,6 +6,42 @@

This document explains how to debug Perl code under mod_perl.

+Most of the L<mod_perl 1.0 debug
+documentation|docs::1.0::guide::debug> applies to mod_perl 2.0:
+
+
+
+
+
+=head2 Detecting Hanging Processes
+
+See L<Hanging Processes: Detection and
+Diagnostics|docs::1.0::guide::debug/Hanging_Processes__Detection_and_Diagnostics>
+for the explanation, but under mp2 to use signals to detect where the
+process is spinning, you can't use C<$SIG{USR2}>, you have to use
+POSIX signals. i.e. the code becomes:
+
+ use Carp ();
+ use POSIX qw(SIGUSR2);
+ my $mask = POSIX::SigSet->new( SIGUSR2 );
+ my $action = POSIX::SigAction->new(\&tell_where_spinning, $mask);
+ my $oldaction = POSIX::SigAction->new();
+ POSIX::sigaction(SIGUSR2, $action, $oldaction );
+
+ sub tell_where_spinning {
+ Carp::confess("caught SIGUSR2!");
+ };
+
+and then:
+
+ % kill USR2 <pid_of_the_spinning_process>
+
+and watch for the trace in F<error_log>.
+
+
+
+
+
=head1 Maintainers

Maintainer is the person(s) you should contact with updates,



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org