Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 3822 invoked by uid 500); 10 Apr 2000 12:16:42 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 3807 invoked by uid 500); 10 Apr 2000 12:16:41 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 10 Apr 2000 12:16:41 -0000 Message-ID: <20000410121641.3802.qmail@locus.apache.org> From: trawick@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/lib/apr/network_io/unix sendrecv.c 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;