On Mon, Mar 5, 2012 at 4:45 AM, Mladen Turk <mt...@apache.org> wrote:

> On 03/05/2012 07:30 AM, cos...@apache.org wrote:
>
>> Author: costin
>> Date: Mon Mar  5 06:30:17 2012
>> New Revision: 1296944
>>
>> URL: 
>> http://svn.apache.org/viewvc?**rev=1296944&view=rev<http://svn.apache.org/viewvc?rev=1296944&view=rev>
>> Log:
>> EINTR needs to be returned to java in order for Poll.interrupt() to work,
>> it is already handled in AprEndpoint.
>>
>
> Not sure if that's correct.
> EINTR is transient signal and doesn't mean that the actual event was fired.
> Any function that waits on some event should restart the operation if EINTR
> was signalled. See 'man poll'
>
> If interrupt doesn't work its something else to blame, not EINTR.
>

If interrupt() is called, EINTR is generated as result to poll - confirmed
with printfs().
Without this change - poll is not interrupted. I spent quite a bit of time
debugging it.

It is true EINTR is 'transient signal' and may be generated without an
event fired - that's what
interrupt is supposed to do after all, and it's possible other events cause
it.

I see no harm in returning this to the java stack - the AprEndpoint is
expecting it along with timeup.

Costin

Reply via email to