Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 60358 invoked from network); 26 Aug 2010 05:04:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Aug 2010 05:04:13 -0000 Received: (qmail 57786 invoked by uid 500); 26 Aug 2010 05:04:12 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 57680 invoked by uid 500); 26 Aug 2010 05:04:10 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 57673 invoked by uid 99); 26 Aug 2010 05:04:09 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 05:04:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 05:03:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D05FC23889DA; Thu, 26 Aug 2010 05:02:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r989443 - /apr/apr/trunk/file_io/win32/pipe.c Date: Thu, 26 Aug 2010 05:02:33 -0000 To: commits@apr.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100826050233.D05FC23889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Thu Aug 26 05:02:33 2010 New Revision: 989443 URL: http://svn.apache.org/viewvc?rev=989443&view=rev Log: Loop if the recv gets WSAEWOULDBLOCK Modified: apr/apr/trunk/file_io/win32/pipe.c Modified: apr/apr/trunk/file_io/win32/pipe.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/pipe.c?rev=989443&r1=989442&r2=989443&view=diff ============================================================================== --- apr/apr/trunk/file_io/win32/pipe.c (original) +++ apr/apr/trunk/file_io/win32/pipe.c Thu Aug 26 05:02:33 2010 @@ -321,7 +321,11 @@ static apr_status_t create_socket_pipe(S } /* Verify the connection by reading the send identification. */ - nrd = recv(*rd, (char *)iid, sizeof(iid), 0); + do { + nrd = recv(*rd, (char *)iid, sizeof(iid), 0); + rv = nrd == SOCKET_ERROR ? apr_get_netos_error() : APR_SUCCESS; + } while (APR_STATUS_IS_EAGAIN(rv)); + if (nrd == sizeof(iid)) { if (memcmp(uid, iid, sizeof(uid)) == 0) { /* Wow, we recived what we send. @@ -337,7 +341,6 @@ static apr_status_t create_socket_pipe(S } } else if (nrd == SOCKET_ERROR) { - rv = apr_get_netos_error(); goto cleanup; } closesocket(*rd);