You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Michael Pilato" <cm...@collab.net> on 2004/08/03 14:03:11 UTC

Re: EWOULDBLOCK on win32

Ben Collins-Sussman <su...@collab.net> writes:

> On Mon, 2004-08-02 at 20:27, mbk@tigris.org wrote:
> > Author: mbk
> > Date: Mon Aug  2 20:27:19 2004
> > New Revision: 10467
> > 
> > Modified:
> >    trunk/subversion/include/svn_io.h
> >    trunk/subversion/include/svn_repos.h
> >    trunk/subversion/libsvn_repos/repos.c
> >    trunk/subversion/libsvn_subr/io.c
> >    trunk/subversion/svnadmin/main.c
> > Log:
> > Make "svnadmin recover" more user-friendly by printing a warning
> > if the repository appears to be locked.
> 
> > -    SVN_ERR_W (svn_io_file_lock (lockfile_path, exclusive, pool),
> > -               "Error opening db lockfile");
> > +    err = svn_io_file_lock2 (lockfile_path, exclusive, nonblocking, pool);
> > +    if (err != NULL && err->apr_err == EWOULDBLOCK)
> 
> I'm setting up a nightly-build batch script on WinXP/VC6 system right
> now.  The script just updated my /trunk working copy, ran gen-make.py,
> msdev, and poof... it tells me that 'EWOuLDBLOCK' is an undeclared
> identifier.

I wonder if our code shouldn't be using the APR_STATUS_IS_EAGAIN()
macro instead of testing EWOULDBLOCK directly?  See apr_errno.h.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: EWOULDBLOCK on win32

Posted by Branko Čibej <br...@xbc.nu>.
C. Michael Pilato wrote:

>Ben Collins-Sussman <su...@collab.net> writes:
>
>  
>
>>On Mon, 2004-08-02 at 20:27, mbk@tigris.org wrote:
>>    
>>
>>>Author: mbk
>>>Date: Mon Aug  2 20:27:19 2004
>>>New Revision: 10467
>>>
>>>Modified:
>>>   trunk/subversion/include/svn_io.h
>>>   trunk/subversion/include/svn_repos.h
>>>   trunk/subversion/libsvn_repos/repos.c
>>>   trunk/subversion/libsvn_subr/io.c
>>>   trunk/subversion/svnadmin/main.c
>>>Log:
>>>Make "svnadmin recover" more user-friendly by printing a warning
>>>if the repository appears to be locked.
>>>      
>>>
>>>-    SVN_ERR_W (svn_io_file_lock (lockfile_path, exclusive, pool),
>>>-               "Error opening db lockfile");
>>>+    err = svn_io_file_lock2 (lockfile_path, exclusive, nonblocking, pool);
>>>+    if (err != NULL && err->apr_err == EWOULDBLOCK)
>>>      
>>>
>>I'm setting up a nightly-build batch script on WinXP/VC6 system right
>>now.  The script just updated my /trunk working copy, ran gen-make.py,
>>msdev, and poof... it tells me that 'EWOuLDBLOCK' is an undeclared
>>identifier.
>>    
>>
>
>I wonder if our code shouldn't be using the APR_STATUS_IS_EAGAIN()
>macro instead of testing EWOULDBLOCK directly?  See apr_errno.h.
>  
>
Yes it should. Checking any kind of error code that doesn't start with 
APR_ is wrong anyway.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org