Lines 102-107
Link Here
|
102 |
static int mpm_state = AP_MPMQ_STARTING; |
102 |
static int mpm_state = AP_MPMQ_STARTING; |
103 |
static ap_pod_t *pod; |
103 |
static ap_pod_t *pod; |
104 |
|
104 |
|
|
|
105 |
static int dummy_listener; |
106 |
|
105 |
/* |
107 |
/* |
106 |
* The max child slot ever assigned, preserved across restarts. Necessary |
108 |
* The max child slot ever assigned, preserved across restarts. Necessary |
107 |
* to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We |
109 |
* to deal with MaxClients changes across AP_SIG_GRACEFUL restarts. We |
Lines 330-337
Link Here
|
330 |
|
332 |
|
331 |
static void stop_listening(int sig) |
333 |
static void stop_listening(int sig) |
332 |
{ |
334 |
{ |
333 |
ap_close_listeners(); |
335 |
ap_listen_rec *lr; |
334 |
|
336 |
|
|
|
337 |
for (lr = ap_listeners; lr; lr = lr->next) { |
338 |
apr_os_sock_t fd; |
339 |
|
340 |
apr_os_sock_get(&fd, lr->sd); |
341 |
|
342 |
dup2(dummy_listener, fd); |
343 |
} |
344 |
|
335 |
/* For a graceful stop, we want the child to exit when done */ |
345 |
/* For a graceful stop, we want the child to exit when done */ |
336 |
die_now = 1; |
346 |
die_now = 1; |
337 |
} |
347 |
} |
Lines 906-911
Link Here
|
906 |
"ignored during restart"); |
916 |
"ignored during restart"); |
907 |
changed_limit_at_restart = 0; |
917 |
changed_limit_at_restart = 0; |
908 |
} |
918 |
} |
|
|
919 |
|
920 |
if (dummy_listener == 0) { |
921 |
dummy_listener = socket(AF_INET, SOCK_STREAM, 0); |
922 |
if (dummy_listener < 0) { |
923 |
rv = errno; |
924 |
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, |
925 |
"Couldn't create dummy listener socket"); |
926 |
mpm_state = AP_MPMQ_STOPPING; |
927 |
return 1; |
928 |
} |
929 |
} |
909 |
|
930 |
|
910 |
/* Initialize cross-process accept lock */ |
931 |
/* Initialize cross-process accept lock */ |
911 |
ap_lock_fname = apr_psprintf(_pconf, "%s.%" APR_PID_T_FMT, |
932 |
ap_lock_fname = apr_psprintf(_pconf, "%s.%" APR_PID_T_FMT, |