tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40107] - JK should handle EAGAIN in jk_is_socket_connected()
Date Tue, 25 Jul 2006 21:05:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40107>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40107





------- Additional Comments From shankarunni@netscape.net  2006-07-25 21:05 -------
(In reply to comment #2)

> http://www.codecomments.com/archive286-2005-10-641948.html

That whole discussion is utterly bizarre and pointless - the thread drifts off
into arguing about how to handle situations where EWOULDBLOCK is not defined. 

The issue here is that on some OSes, the two constants have different values,
and read() can return either value depending on the circumstances of how the
socket was set up. (But from a semantic point of view, what it's saying in both
cases is that there is a need to retry the operation, which is the important
thing to take away. See
http://devrsrc1.external.hp.com/STKS/cgi-bin/man2html?manpage=/usr/share/man/man2.Z/send.2
- the link in the quoted thread)

On other OSes, the two constants are the same value.  Are there any on which
EWOULDBLOCK is not even defined? I don't think so. 

In any case, the code could be fixed as:

  if (errno == EAGAIN
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
      || errno == EWOULDBLOCK
#endif
     )
  {
     // try again later
  }


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message