ASF Bugzilla – Attachment 23784 Details for
Bug 47335
An extra stderr file descriptor is leaked to forked CGI processes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mod_cgid.diff
mod_cgid.diff (text/plain), 1.22 KB, created by
Kornél Pál
on 2009-06-10 04:55:19 UTC
(
hide
)
Description:
mod_cgid.diff
Filename:
MIME Type:
Creator:
Kornél Pál
Created:
2009-06-10 04:55:19 UTC
Size:
1.22 KB
patch
obsolete
>--- mod_cgid.c.old 2008-08-16 00:08:05.000000000 +0200 >+++ mod_cgid.c 2009-06-10 13:39:41.951575400 +0200 >@@ -302,6 +302,13 @@ > } > #endif > >+static apr_status_t close_unix_socket(void *thefd) >+{ >+ int fd = (int)((long)thefd); >+ >+ return close(fd); >+} >+ > /* deal with incomplete reads and signals > * assume you really have to read buf_size bytes > */ >@@ -632,6 +639,9 @@ > } > } > >+ apr_pool_cleanup_register(pcgi, (void *)((long)sd), >+ close_unix_socket, close_unix_socket); >+ > unixd_setup_child(); /* if running as root, switch to configured user/group */ > > while (!daemon_should_exit) { >@@ -741,6 +751,7 @@ > */ > ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, > "couldn't set child process attributes: %s", r->filename); >+ close(sd2); > } > else { > apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans); >@@ -1113,13 +1124,6 @@ > return ret; > } > >-static apr_status_t close_unix_socket(void *thefd) >-{ >- int fd = (int)((long)thefd); >- >- return close(fd); >-} >- > static int connect_to_daemon(int *sdptr, request_rec *r, > cgid_server_conf *conf) > {
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 47335
: 23784