]>
Commit | Line | Data |
---|---|---|
3b443f9b AM |
1 | Index: server/mpm/prefork/prefork.c |
2 | =================================================================== | |
3 | --- server/mpm/prefork/prefork.c (wersja 1069427) | |
4 | +++ server/mpm/prefork/prefork.c (wersja 1069428) | |
5 | @@ -330,6 +330,7 @@ | |
6 | ||
7 | static void stop_listening(int sig) | |
8 | { | |
9 | + mpm_state = AP_MPMQ_STOPPING; | |
10 | ap_close_listeners(); | |
11 | ||
12 | /* For a graceful stop, we want the child to exit when done */ | |
13 | @@ -350,6 +351,7 @@ | |
14 | */ | |
15 | return; | |
16 | } | |
17 | + mpm_state = AP_MPMQ_STOPPING; | |
18 | shutdown_pending = 1; | |
19 | is_graceful = (sig == AP_SIG_GRACEFUL_STOP); | |
20 | } | |
21 | @@ -363,6 +365,7 @@ | |
22 | /* Probably not an error - don't bother reporting it */ | |
23 | return; | |
24 | } | |
25 | + mpm_state = AP_MPMQ_STOPPING; | |
26 | restart_pending = 1; | |
27 | is_graceful = (sig == AP_SIG_GRACEFUL); | |
28 | } | |
29 | @@ -458,8 +461,10 @@ | |
30 | ||
31 | int ap_graceful_stop_signalled(void) | |
32 | { | |
33 | - /* not ever called anymore... */ | |
34 | - return 0; | |
35 | + /* Return true if the server is stopping for whatever reason; the | |
36 | + * function is used to initiate a fast exit from the connection | |
37 | + * processing loop. */ | |
38 | + return mpm_state == AP_MPMQ_STOPPING; | |
39 | } | |
40 | ||
41 | ||
42 |