Refactored prepare_path and prepare_query_parameters to avoid the use of URI.pm and...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / HTTP.pm
index b320a3d..1bc26b1 100644 (file)
@@ -244,6 +244,12 @@ sub run {
     # Ignore broken pipes as an HTTP server should
     local $SIG{PIPE} = 'IGNORE';
     
+    # Restart on HUP
+    local $SIG{HUP} = sub { 
+        $restart = 1;
+        warn "Restarting server on SIGHUP...\n";
+    };
+    
     LISTEN:
     while ( !$restart ) {
         while ( accept( Remote, $daemon ) ) {