It looks like it is taking time for the message to arrive and that is what is causing the APR_EINTR. After all, it is behaving exacting like a wait for no data. The apr_sleep() "ensures" time.
> On Jan 11, 2017, at 2:31 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote: > > According to apr_pollset_poll (-1 is the wakeup timeout) > > Remarks > APR_EINTR will be returned if the pollset has been created with > APR_POLLSET_WAKEABLE, apr_pollset_wakeup() has been called while > waiting for activity, and there were no signalled descriptors at the > time of the wakeup call. > > Clearly -1 time has not expired. > > The test in question; > rv = apr_pollset_wakeup(pollset); > ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); > > rv = apr_pollset_poll(pollset, -1, &num, &descriptors); > ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); > ABTS_INT_EQUAL(tc, 1, num); > > So the lingering question is whether this is a general unix implementation bug > or specific to OSX behavior. > > > > On Wed, Jan 11, 2017 at 7:22 AM, Jim Jagielski <j...@jagunet.com> wrote: >> >> On my system, poll works. >> >>> On Jan 10, 2017, at 3:15 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote: >>> >>> Hmmm... I knew this sounded familiar... >>> >>> https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/ >>> >>> On Tue, Jan 10, 2017 at 9:46 AM, Jim Jagielski <j...@jagunet.com> wrote: >>>> I didn't realize it referred to the actual line number in the >>>> source file... How dumb :) >>>> >>>> This is on OSX so I'm getting EINTR. >>>> >>>> Weird. >>>> >>>>> On Jan 10, 2017, at 10:20 AM, Rainer Jung <rainer.j...@kippdata.de> wrote: >>>>> >>>>> Am 10.01.2017 um 15:35 schrieb Jim Jagielski: >>>>>> Occasionally, I get: >>>>>> >>>>>> testpoll : /Line 816: expected <0>, but saw <4> >>>>>> >>>>>> Anyway I could easily see what test, exactly, is failing? >>>>>> ./testall -v testpoll does nil. >>>>> >>>>> Depending on which version of APR you are testing, it should be line 816 >>>>> of file test/testpoll.c, e.g. in 1.5.x and 1.6.x HEAD: >>>>> >>>>> ... >>>>> 815 rv = apr_pollset_poll(pollset, -1, &num, &descriptors); >>>>> 816 ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); >>>>> 817 ABTS_INT_EQUAL(tc, 1, num); >>>>> ... >>>>> >>>>> checking the return code of the apr_pollset_poll() call in 815 against >>>>> APR_SUCCESS. So I guess the expected <0> is APR_SUCCESS and the real >>>>> return code was 4. >>>>> >>>>> Regards, >>>>> >>>>> Rainer >>>> >>