From: Jeff Trawick Date: Thu, 14 Jun 2001 15:46:44 +0000 (+0000) Subject: fix some more signalling issues: X-Git-Tag: 2.0.19~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7627b275abe4e0319a45272cde2bfbecb8f0212d;p=thirdparty%2Fapache%2Fhttpd.git fix some more signalling issues: . 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 --- diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index d5f052fc436..574b7be46ab 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -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