]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix some more signalling issues:
authorJeff Trawick <trawick@apache.org>
Thu, 14 Jun 2001 15:46:44 +0000 (15:46 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 14 Jun 2001 15:46:44 +0000 (15:46 +0000)
. in ONE_PROCESS mode, bail out immediately for SIGHUP and
  SIGINT

  Note that if you send HUP or INT and have cgid then cgid won't
  go away.  If you generate the interrupt signal from the httpd
  terminal then cgid will go away, [I guess] because SIGINT gets sent
  to the process group.  Perhaps just_die() needs to have logic to
  send to other processes in the group for ONE_PROCES mode

. the die_now flag should be static

. please_die_gracefully() is no longer needed

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

server/mpm/prefork/prefork.c

index d5f052fc4368a040e171d823d078cefc142bcfd9..574b7be46abbc6c8b964b6873d4f8f17c2c77cfa 100644 (file)
@@ -187,7 +187,7 @@ int tpf_child = 0;
 char tpf_server_name[INETD_SERVNAME_LENGTH+1];
 #endif /* TPF */
 
-int die_now = 0;
+static int die_now = 0;
 
 #ifdef GPROF
 /* 
@@ -382,12 +382,6 @@ static void just_die(int sig)
     clean_child_exit(0);
 }
 
-static void please_die_gracefully(int sig)
-{
-    /* clean_child_exit(0); */
-    die_now = 1;
-}
-
 /* volatile just in case */
 static int volatile shutdown_pending;
 static int volatile restart_pending;
@@ -830,8 +824,9 @@ static int make_child(server_rec *s, int slot)
     }
 
     if (one_process) {
-       apr_signal(SIGHUP, please_die_gracefully);
-       apr_signal(SIGINT, please_die_gracefully);
+       apr_signal(SIGHUP, just_die);
+        /* Don't catch SIGWINCH in ONE_PROCESS mode :) */
+       apr_signal(SIGINT, just_die);
 #ifdef SIGQUIT
        apr_signal(SIGQUIT, SIG_DFL);
 #endif