[Catalyst-commits] r10408 - Catalyst-Devel/1.00/trunk/lib/Catalyst/Restarter

autarch at dev.catalyst.perl.org autarch at dev.catalyst.perl.org
Mon Jun 1 19:42:28 GMT 2009


Author: autarch
Date: 2009-06-01 19:42:28 +0000 (Mon, 01 Jun 2009)
New Revision: 10408

Modified:
   Catalyst-Devel/1.00/trunk/lib/Catalyst/Restarter/Forking.pm
Log:
Wait on the child process before starting a new child - hopefully will
fix intermittent problems arcanez reported where the restarter cannot
start a new child because the port is not available.


Modified: Catalyst-Devel/1.00/trunk/lib/Catalyst/Restarter/Forking.pm
===================================================================
--- Catalyst-Devel/1.00/trunk/lib/Catalyst/Restarter/Forking.pm	2009-06-01 17:08:48 UTC (rev 10407)
+++ Catalyst-Devel/1.00/trunk/lib/Catalyst/Restarter/Forking.pm	2009-06-01 19:42:28 UTC (rev 10408)
@@ -28,9 +28,12 @@
 
     return unless kill 0, $self->_child;
 
-    local $SIG{CHLD} = 'IGNORE';
     die "Cannot send INT signal to ", $self->_child, ": $!"
         unless kill 'INT', $self->_child;
+    # If we don't wait for the child to exit, we could attempt to
+    # start a new server before the old one has given up the port it
+    # was listening on.
+    wait;
 }
 
 1;




More information about the Catalyst-commits mailing list