From: Jeff Trawick Date: Thu, 14 Jun 2001 15:26:48 +0000 (+0000) Subject: For SIGHUP in the server processes, we attempt to go away immediately, X-Git-Tag: 2.0.19~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff01b91f5f59c5dbad83a085d744f51eb722fec7;p=thirdparty%2Fapache%2Fhttpd.git For SIGHUP in the server processes, we attempt to go away immediately, 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 --- diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 5df0b4a57bb..d5f052fc436 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -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.