RFR 8203369 : Check for both EAGAIN and EWOULDBLOCK error codes (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Fri May 25 11:27:47 UTC 2018
- Previous message: RFR 8203369 : Check for both EAGAIN and EWOULDBLOCK error codes
- Next message: RFR 8203369 : Check for both EAGAIN and EWOULDBLOCK error codes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 24/05/2018 21:57, Ivan Gerasimov wrote:
Hello!
On Unix systems several system calls (including pread, read, readv, recvfrom, recvmsg, send, sendfile, sendmsg, sendto) may set errno to either EAGAIN or EWOULDBLOCK on the same condition. On Linux these two constants are the same, but they are not required to be the same. For example, here's an extract from the Linux man page of send(): EAGAIN or EWOULDBLOCK The socket is marked nonblocking and the requested operation would block. POSIX.1-2001 allows either error to be returned for this case, and does not require these constants to have the same value, so a portable application should check for both possibilities. We should check for both error codes when appropriate. Would you please help review the fix? BUGURL: https://bugs.openjdk.java.net/browse/JDK-8203369 WEBREV: http://cr.openjdk.java.net/~igerasim/8203369/00/webrev/ The changes in 01/webrev look okay to me but I'm curious if there are any ports in OpenJDK where the values are different. If they are different then I would assume that many tests will fail.
-Alan
- Previous message: RFR 8203369 : Check for both EAGAIN and EWOULDBLOCK error codes
- Next message: RFR 8203369 : Check for both EAGAIN and EWOULDBLOCK error codes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]