On Wed, Dec 19, 2012 at 8:31 PM, Philip Martin
<philip.mar...@wandisco.com> wrote:
> "C. Michael Pilato" <cmpil...@collab.net> writes:
>
>> On 12/19/2012 01:59 PM, C. Michael Pilato wrote:
>>> On 12/19/2012 01:53 PM, Daniel Shahaf wrote:
>>>> Actual result: backgrounding svn killed it.
>>>>
>>>> Expected result: after 'bg\n', keep fetching+filtering+printing log
>>>> messages in the background.
>>>>
>>>> It worked in 1.7 with neon.  Can we make it work in 1.8 too?
>>>
>>> Please file an issue.  With as much code and complaint flying around as we
>>> have, sometimes my view is:  "No issue, no problem."  But I suspect the
>>> issue needs to be filed against Serf, not Subversion.  The error you show is
>>> simply what is returned from serf_context_run().
>>
>> Sorry:  to clarify, it's a Subversion-generated error message which wraps
>> the status code returned from serf_context_run().
>
> Yes, I can reproduce it on my Linux machine but only if the interrupt
> occurs in an epoll_wait call:
>
> epoll_wait(3, ^Z
> [1]+  Stopped                 strace subversion/svn/.libs/lt-svn log 
> http://svn.apache.org/repos/asf/subversion
> $ fg
> strace subversion/svn/.libs/lt-svn log 
> http://svn.apache.org/repos/asf/subversion
> 7fb0234461e8, 16, 500)    = -1 EINTR (Interrupted system call)
> --- SIGCONT (Continued) @ 0 (0) ---

On Ubuntu I can reproduce this issue at the first try, On Mac OS X not at all.

Attached patch to serf fixes the issue for me.

[..]

Lieven
Index: context.c
===================================================================
--- context.c   (revision 1701)
+++ context.c   (working copy)
@@ -289,6 +289,11 @@ apr_status_t serf_context_run(
 
     if ((status = apr_pollset_poll(ps->pollset, duration, &num,
                                    &desc)) != APR_SUCCESS) {
+        /* EINTR indicates a handled signal happened during the poll call,
+           ignore, the application can safely retry. */
+        if (APR_STATUS_IS_EINTR(status))
+            return APR_SUCCESS;
+
         /* ### do we still need to dispatch stuff here?
            ### look at the potential return codes. map to our defined
            ### return values? ...

Reply via email to