apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: svn commit: r1543033 - /apr/apr/trunk/network_io/unix/socket_util.c
Date Mon, 18 Nov 2013 14:36:05 GMT
On Mon, Nov 18, 2013 at 9:30 AM, Jim Jagielski <jim@jagunet.com> wrote:

> The #else part is what's originally in there... afaik, the
> test only fails for OSX because of this issue (rtnevents
> contains both the POLLIN and POLLHUP bits).
>

understood; the original code looks fragile...


>
> This is a long standing OSX issue...


I interpret that as "yes, the testcase failed"...

and since we have a useful testcase then maybe it is worth abandoning the
#else path...  but YMMV :)



> will look to see
> if theres anything in BUGZ
> On Nov 18, 2013, at 9:24 AM, Jeff Trawick <trawick@gmail.com> wrote:
>
> > On Mon, Nov 18, 2013 at 9:10 AM, <jim@apache.org> wrote:
> > Author: jim
> > Date: Mon Nov 18 14:10:58 2013
> > New Revision: 1543033
> >
> > URL: http://svn.apache.org/r1543033
> > Log:
> > OSX (Darwin) returns APR_POLLHUP|APR_POLLIN, so the
> > test for equality fails. Instead, just check for the bit.
> >
> > Modified:
> >     apr/apr/trunk/network_io/unix/socket_util.c
> >
> > Modified: apr/apr/trunk/network_io/unix/socket_util.c
> > URL:
> http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/socket_util.c?rev=1543033&r1=1543032&r2=1543033&view=diff
> >
> ==============================================================================
> > --- apr/apr/trunk/network_io/unix/socket_util.c (original)
> > +++ apr/apr/trunk/network_io/unix/socket_util.c Mon Nov 18 14:10:58 2013
> > @@ -46,7 +46,12 @@ APR_DECLARE(apr_status_t) apr_socket_atr
> >          /* Some other error -> unexpected error. */
> >          return rv;
> >      }
> > +#if defined(DARWIN)
> > +    /* OSX returns APR_POLLHUP|APR_POLLIN */
> > +    else if (nfds == 1 && (pfds[0].rtnevents & APR_POLLIN)  ==
> APR_POLLIN) {
> > +#else
> >      else if (nfds == 1 && pfds[0].rtnevents == APR_POLLIN) {
> > +#endif
> >
> > Trying to read if APR_POLLIN, independent of other flags, seems valid
> for all platforms...
> >
> > BTW, is the testsock testcase failing on OS X, or is this something not
> caught by testsock?
> >
> >
> >          apr_sockaddr_t unused;
> >          apr_size_t len = 1;
> >          char buf;
> >
> >
> >
> >
> >
> > --
> > Born in Roswell... married an alien...
> > http://emptyhammock.com/
>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Mime
View raw message