Justin Erenkrantz <[EMAIL PROTECTED]> writes:
> I believe this is a bare-bones essential patch required for getting POD
> to work correctly under threaded MPM. The apr_recv() may return success
> but return 0 length (indicating the pipe is fine, but there were not any
> characters to read). Therefore, we should check the returned length
> being 1. The code in mpm_common.c already does this.
I just started looking at APR to see what to change but I don't see a
problem.
I just played on Solaris 8... I don't see a problem there.
APR prefers O_NONBLOCK (goodness, since O_NONBLOCK on Solaris has the
-1/EAGAIN feedback for this situation)
a check of the pod using current threaded.c and current APR running on
Solaris 8 gets EAGAIN/len=0 from the apr_recv() when nothing has been
written to the pod
All I changed was mainline to call check_pipe_of_death() whenever a
new connection came in and I added a log to check_pipe_of_death() to
show feedback from apr_recv().
where is the problem?
Index: server/mpm/threaded/threaded.c
===================================================================
RCS file: /cvs/apache/httpd-2.0/server/mpm/threaded/threaded.c,v
retrieving revision 1.46
diff -u -r1.46 threaded.c
--- threaded.c 2001/07/18 20:45:36 1.46
+++ threaded.c 2001/07/20 20:50:23
@@ -507,6 +507,10 @@
apr_size_t n = 1;
ret = apr_recv(listensocks[0], &pipe_read_char, &n);
+
+ap_log_error(APLOG_MARK, APLOG_EMERG, ret, ap_server_conf,
+ "n %" APR_SIZE_T_FMT, n);
+
if (APR_STATUS_IS_EAGAIN(ret)) {
/* It lost the lottery. It must continue to suffer
* through a life of servitude. */
@@ -615,6 +619,7 @@
}
got_fd:
if (!workers_may_exit) {
+ check_pipe_of_death();
if ((rv = apr_accept(&csd, sd, ptrans)) != APR_SUCCESS) {
csd = NULL;
ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
--
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...