httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/unix sendrecv.c
Date Mon, 10 Apr 2000 12:16:41 GMT
trawick     00/04/10 05:16:41

  Modified:    src/lib/apr/file_io/unix readwrite.c
               src/lib/apr/network_io/unix sendrecv.c
  Log:
  Check for EWOULDBLOCK in addition to EAGAIN inside APR.
  
  Revision  Changes    Path
  1.36      +6 -2      apache-2.0/src/lib/apr/file_io/unix/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- readwrite.c	2000/04/07 01:41:40	1.35
  +++ readwrite.c	2000/04/10 12:16:40	1.36
  @@ -117,7 +117,9 @@
           rv = read(thefile->filedes, buf, *nbytes);
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && thefile->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        thefile->timeout != 0) {
           ap_status_t arv = wait_for_io_or_timeout(thefile, 1);
           if (arv != APR_SUCCESS) {
               *nbytes = 0;
  @@ -170,7 +172,9 @@
           rv = write(thefile->filedes, buf, *nbytes);
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && thefile->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        thefile->timeout != 0) {
           ap_status_t arv = wait_for_io_or_timeout(thefile, 0);
           if (arv != APR_SUCCESS) {
               *nbytes = 0;
  
  
  
  1.19      +18 -6     apache-2.0/src/lib/apr/network_io/unix/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sendrecv.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- sendrecv.c	2000/04/03 19:45:10	1.18
  +++ sendrecv.c	2000/04/10 12:16:41	1.19
  @@ -112,7 +112,9 @@
           rv = write(sock->socketdes, buf, (*len));
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && sock->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        sock->timeout != 0) {
   	ap_status_t arv = wait_for_io_or_timeout(sock, 0);
   	if (arv != APR_SUCCESS) {
   	    *len = 0;
  @@ -150,7 +152,9 @@
           rv = read(sock->socketdes, buf, (*len));
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && sock->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        sock->timeout != 0) {
   	ap_status_t arv = wait_for_io_or_timeout(sock, 1);
   	if (arv != APR_SUCCESS) {
   	    *len = 0;
  @@ -191,7 +195,9 @@
           rv = writev(sock->socketdes, vec, nvec);
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && sock->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        sock->timeout != 0) {
   	ap_status_t arv = wait_for_io_or_timeout(sock, 0);
   	if (arv != APR_SUCCESS) {
   	    *len = 0;
  @@ -270,7 +276,9 @@
               );
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && sock->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        sock->timeout != 0) {
   	arv = wait_for_io_or_timeout(sock, 0);
   	if (arv != APR_SUCCESS) {
   	    *len = 0;
  @@ -347,7 +355,9 @@
               );
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && sock->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        sock->timeout != 0) {
   	ap_status_t arv = wait_for_io_or_timeout(sock, 0);
   	if (arv != APR_SUCCESS) {
   	    *len = 0;
  @@ -434,7 +444,9 @@
               );
       } while (rv == -1 && errno == EINTR);
   
  -    if (rv == -1 && errno == EAGAIN && sock->timeout != 0) {
  +    if (rv == -1 && 
  +        (errno == EAGAIN || errno == EWOULDBLOCK) && 
  +        sock->timeout != 0) {
           struct timeval *tv;
           fd_set fdset;
           int srv;
  
  
  

Mime
View raw message