You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/12/05 15:49:30 UTC
cvs commit: httpd-2.0/server/mpm/spmt_os2 spmt_os2.c
wrowe 00/12/05 06:49:29
Modified: server/mpm/spmt_os2 spmt_os2.c
Log:
Release the last occurance of apr_canonical_error. Next stop, apr.
Revision Changes Path
1.67 +27 -53 httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
Index: spmt_os2.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- spmt_os2.c 2000/12/04 19:24:00 1.66
+++ spmt_os2.c 2000/12/05 14:49:27 1.67
@@ -871,9 +871,14 @@
THREAD_GLOBAL(usr1_just_die) = 0;
rv = apr_accept(&csd, sd, ptrans);
- if (rv == APR_SUCCESS)
+ if (APR_STATUS_IS_SUCCESS(rv)) {
break; /* We have a socket ready for reading */
- else {
+ }
+ else if (APR_STATUS_IS_ECONNABORTED(rv)
+ || APR_STATUS_IS_ECONNRESET(rv)
+ || APR_STATUS_IS_ETIMEDOUT(rv)
+ || APR_STATUS_IS_EHOSTUNREACH(rv)
+ || APR_STATUS_IS_ENETUNREACH(rv)) {
/* Our old behaviour here was to continue after accept()
* errors. But this leads us into lots of troubles
@@ -885,58 +890,27 @@
* lead to never-ending loops here. So it seems best
* to just exit in most cases.
*/
- switch (apr_canonical_error(rv)) {
-#ifdef EPROTO
- /* EPROTO on certain older kernels really means
- * ECONNABORTED, so we need to ignore it for them.
- * See discussion in new-httpd archives nh.9701
- * search for EPROTO.
- *
- * Also see nh.9603, search for EPROTO:
- * There is potentially a bug in Solaris 2.x x<6,
- * and other boxes that implement tcp sockets in
- * userland (i.e. on top of STREAMS). On these
- * systems, EPROTO can actually result in a fatal
- * loop. See PR#981 for example. It's hard to
- * handle both uses of EPROTO.
- */
- case EPROTO:
-#endif
-#ifdef ECONNABORTED
- case ECONNABORTED:
-#endif
- /* Linux generates the rest of these, other tcp
- * stacks (i.e. bsd) tend to hide them behind
- * getsockopt() interfaces. They occur when
- * the net goes sour or the client disconnects
- * after the three-way handshake has been done
- * in the kernel but before userland has picked
- * up the socket.
- */
-#ifdef ECONNRESET
- case ECONNRESET:
-#endif
-#ifdef ETIMEDOUT
- case ETIMEDOUT:
-#endif
-#ifdef EHOSTUNREACH
- case EHOSTUNREACH:
-#endif
-#ifdef ENETUNREACH
- case ENETUNREACH:
-#endif
- break;
- case EINTR:
- /* We only get hit by an EINTR if the parent is
- * killing us off
- */
- clean_child_exit(0);
- default:
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
- "accept: (client socket)");
- clean_child_exit(1);
- }
+ /* Linux generates most of these, other tcp
+ * stacks (i.e. bsd) tend to hide them behind
+ * getsockopt() interfaces. They occur when
+ * the net goes sour or the client disconnects
+ * after the three-way handshake has been done
+ * in the kernel but before userland has picked
+ * up the socket.
+ */
+ break;
+ }
+ else if (APR_STATUS_IS_EINTR(rv)) {
+ /* We only get hit by an EINTR if the parent is
+ * killing us off
+ */
+ clean_child_exit(0);
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
+ "accept: (client socket)");
+ clean_child_exit(1);
}
if (ap_stop_signalled()) {
RE: cvs commit: httpd-2.0/server/mpm/spmt_os2 spmt_os2.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Brian Havard [mailto:brianh@kheldar.apana.org.au]
> Sent: Tuesday, December 05, 2000 10:14 AM
>
> On 5 Dec 2000 14:49:30 -0000, wrowe@locus.apache.org wrote:
>
> >wrowe 00/12/05 06:49:29
> >
> > Modified: server/mpm/spmt_os2 spmt_os2.c
> > Log:
> > Release the last occurance of apr_canonical_error. Next stop, apr.
> >
> > Revision Changes Path
> > 1.67 +27 -53 httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
>
> And it still compiles & runs cleanly. Well done.
ack, thanks. Now to simply get win32 to build so we can make progress :-)
I'll rip out apr_canonical_error a bit later today.
Re: cvs commit: httpd-2.0/server/mpm/spmt_os2 spmt_os2.c
Posted by Brian Havard <br...@kheldar.apana.org.au>.
On 5 Dec 2000 14:49:30 -0000, wrowe@locus.apache.org wrote:
>wrowe 00/12/05 06:49:29
>
> Modified: server/mpm/spmt_os2 spmt_os2.c
> Log:
> Release the last occurance of apr_canonical_error. Next stop, apr.
>
> Revision Changes Path
> 1.67 +27 -53 httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
And it still compiles & runs cleanly. Well done.
--
______________________________________________________________________________
| Brian Havard | "He is not the messiah! |
| brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian |
------------------------------------------------------------------------------