[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: the retry loop in svn_io_file_lock2()

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 31 Mar 2011 00:22:11 +0200

Blair Zajac wrote on Wed, Mar 30, 2011 at 15:13:07 -0700:
> On 03/30/2011 03:06 PM, Daniel Shahaf wrote:
> >I notice that FILE_LOCK_RETRY_LOOP() checks for EINTR when EDEADLK isn't
> >defined (or when APR isn't threaded). I assume that check is there for
> >the same reason --- i.e., that EINTR is another symptom of the deadlock
> >situation that FILE_LOCK_RETRY_LOOP() was added due to?
>
> No, that's unrelated. While I was working on the function, I
> decided to handle EINTR in the same way that many of our other io
> functions do, e.g. svn_io_create_unique_link(), svn_io_read_link(),
> do_io_file_wrapper_cleanup(). This one didn't seem to hurt and
> makes the function more robust. I didn't want spurious EINTR errors
> when trying to get a lock.
>

Okay, thanks. I stand by my +1 then.

(APR already handles EINTR in apr_file_lock(), at least in some
environments; but I don't see the harm in leaving our check in too.)

> Blair
Received on 2011-03-31 00:22:47 CEST

This is an archived mail posted to the Subversion Dev mailing list.