Commit 517cc7dd authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent 0ef4a3df
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -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