bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] make EAGAIN == EWOULDBLOCK on Windows


From: Paolo Bonzini
Subject: Re: [PATCH] make EAGAIN == EWOULDBLOCK on Windows
Date: Fri, 03 Oct 2008 16:02:23 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

>> This patch tweaks the mapping of error codes in the errno module and in
>> winsock.c, so that under mingw EWOULDBLOCK is not different from EAGAIN.
> 
> Why should this be done? POSIX [1] does not require this. Portable 
> applications
> have to check against both EAGAIN and EWOULDBLOCK.

But it allows it, and most POSIX implementations have this feature.

>> It was inspired by the flock patch.
> 
> flock() is documented to use EWOULDBLOCK in some cases.

Yes, and it seemed strange to return a WSA error code even though its
return code is supported by the run-time library (as EAGAIN).

> The right action in
> this case IMO is to make the 'flock' module depend on the 'errno' module.

That's a good thing anyway, and orthogonal to this patch.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]