Commit 0ef4a3df authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent 549c29ac
Loading
Loading
Loading
Loading
+3 −12
Original line number Diff line number Diff line
@@ -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.