]> granicus.if.org Git - apache/commitdiff
For SIGHUP in the server processes, we attempt to go away immediately,
authorJeff Trawick <trawick@apache.org>
Thu, 14 Jun 2001 15:26:48 +0000 (15:26 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 14 Jun 2001 15:26:48 +0000 (15:26 +0000)
just as for SIGTERM.  If we deadlock because of some module or library
issue then SIGKILL will come soon enough.

Stop dorking with SIGTERM and SIGHUP in make_child().  That makes it
kind of hard for the caller to set up for ONE_PROCESS mode.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89368 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c

index 5df0b4a57bb4c746b788119eb05786f14dce4396..d5f052fc4368a040e171d823d078cefc142bcfd9 100644 (file)
@@ -577,16 +577,8 @@ static void child_main(int child_num_arg)
 
     (void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(my_child_num), SERVER_READY, (request_rec *) NULL);
 
-    apr_signal(SIGHUP, please_die_gracefully);
-
     ap_sync_scoreboard_image();
     while (!die_now) {
-
-       /* Prepare to receive a SIGWINCH due to graceful restart so that
-        * we can exit cleanly.
-        */
-        apr_signal(SIGTERM, just_die);
-
        /*
         * (Re)initialize this child to a pre-connection state.
         */
@@ -887,11 +879,10 @@ static int make_child(server_rec *s, int slot)
        }
 #endif
        RAISE_SIGSTOP(MAKE_CHILD);
-       /* Disable the restart signal handlers and enable the please_die_gracefully stuff.
-        * Note that since restart() just notes that a restart has been
-        * requested there's no race condition here.
+        /* Disable the parent's signal handlers and set up proper handling in
+         * the child.
         */
-       apr_signal(SIGHUP, please_die_gracefully);
+       apr_signal(SIGHUP, just_die);
        apr_signal(SIGTERM, just_die);
         /* The child process doesn't do anything for SIGWINCH.  Instead, the
          * pod is used for signalling graceful restart.