Return child PID from HTTP engine when run with 'background' option
Andy Grundman [Wed, 5 Sep 2007 19:46:43 +0000 (19:46 +0000)]
Changes
lib/Catalyst/Engine/HTTP.pm

diff --git a/Changes b/Changes
index 5710bb3..f97431b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,7 +1,9 @@
 # This file documents the revision history for Perl extension Catalyst.
 
 5.7011
-        - Patch for emacs temp files with module::pluggable::object from rolsky
+        - Patch for emacs temp files with module::pluggable::object. (Dave Rolsky)
+        - Return child PID from the HTTP engine when run with the 'background' option.
+          (Emanuele Zeppieri)
         - Fixed bug in HTTP engine where writes could fail with
           'Resource temporarily unavailable'.
 
index 12a8733..2a718c4 100644 (file)
@@ -184,7 +184,7 @@ sub run {
     if ($options->{background}) {
         my $child = fork;
         die "Can't fork: $!" unless defined($child);
-        exit if $child;
+        return $child if $child;
     }
 
     my $restart = 0;