You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2009/01/21 22:52:29 UTC
svn commit: r736427 - in /httpd/httpd/trunk/server/mpm/winnt: child.c
mpm_winnt.c
Author: rjung
Date: Wed Jan 21 13:52:28 2009
New Revision: 736427
URL: http://svn.apache.org/viewvc?rev=736427&view=rev
Log:
Fix two small glitches in r730828 (Win9x code
removal in mpm_winnt).
Modified:
httpd/httpd/trunk/server/mpm/winnt/child.c
httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
Modified: httpd/httpd/trunk/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=736427&r1=736426&r2=736427&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/child.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/child.c Wed Jan 21 13:52:28 2009
@@ -1093,6 +1093,8 @@
"Child %d: All worker threads have exited.", my_pid);
apr_thread_mutex_destroy(child_lock);
+ apr_thread_mutex_destroy(qlock);
+ CloseHandle(qwait_event);
apr_pool_destroy(pchild);
CloseHandle(exit_event);
Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=736427&r1=736426&r2=736427&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Wed Jan 21 13:52:28 2009
@@ -432,8 +432,6 @@
DWORD BytesRead;
int lcnt = 0;
SOCKET nsd;
- HANDLE hProcess = GetCurrentProcess();
- HANDLE dup;
/* Set up a default listener if necessary */
if (ap_listeners == NULL) {
@@ -466,12 +464,10 @@
exit(APEXIT_CHILDINIT);
}
- if (DuplicateHandle(hProcess, (HANDLE) nsd, hProcess, &dup,
- 0, FALSE, DUPLICATE_SAME_ACCESS)) {
- closesocket(nsd);
- nsd = (SOCKET) dup;
+ if (!SetHandleInformation((HANDLE)nsd, HANDLE_FLAG_INHERIT, 0)) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), ap_server_conf,
+ "set_listeners_noninheritable: SetHandleInformation failed.");
}
-
apr_os_sock_put(&lr->sd, &nsd, s->process->pool);
}