ASF Bugzilla – Attachment 32555 Details for
Bug 57685
Requests are denied while the mod_cgid daemon starts up
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Delay cgi requests made before the cgid daemon has started
cgid.patch (text/plain), 1.71 KB, created by
Edward Lu
on 2015-03-10 19:36:12 UTC
(
hide
)
Description:
Delay cgi requests made before the cgid daemon has started
Filename:
MIME Type:
Creator:
Edward Lu
Created:
2015-03-10 19:36:12 UTC
Size:
1.71 KB
patch
obsolete
>diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c >index d14124b..5a3e03d 100644 >--- a/modules/generators/mod_cgid.c >+++ b/modules/generators/mod_cgid.c >@@ -1170,7 +1170,10 @@ static int connect_to_daemon(int *sdptr, request_rec *r, > "unable to create socket to cgi daemon"); > } > if (connect(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) { >- if (errno == ECONNREFUSED && connect_tries < DEFAULT_CONNECT_ATTEMPTS) { >+ /* ECONNREFUSED means the listen queue is full; ENOENT means that >+ * the cgid server hasn't started up yet */ >+ if ((errno == ECONNREFUSED || errno == ENOENT) >+ && connect_tries < DEFAULT_CONNECT_ATTEMPTS) { > ap_log_rerror(APLOG_MARK, APLOG_DEBUG, errno, r, > "connect #%d to cgi daemon failed, sleeping before retry", > connect_tries); >@@ -1191,8 +1194,10 @@ static int connect_to_daemon(int *sdptr, request_rec *r, > close_unix_socket, apr_pool_cleanup_null); > break; /* we got connected! */ > } >- /* gotta try again, but make sure the cgid daemon is still around */ >- if (kill(daemon_pid, 0) != 0) { >+ /* gotta try again, but make sure the cgid daemon is still around >+ * If we got ENOENT, that means the cgid daemon hasn't even been >+ * started yet, so skip this check */ >+ if (errno != ENOENT && kill(daemon_pid, 0) != 0) { > return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, > "cgid daemon is gone; is Apache terminating?"); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 57685
:
32555
|
32577
|
32578
|
32579
|
32580