From dev-return-21420-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Mon Feb 16 12:22:52 2009 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 55160 invoked from network); 16 Feb 2009 12:22:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2009 12:22:52 -0000 Received: (qmail 55156 invoked by uid 500); 16 Feb 2009 12:22:52 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 54764 invoked by uid 500); 16 Feb 2009 12:22:50 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 54747 invoked by uid 99); 16 Feb 2009 12:22:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 04:22:50 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [213.191.128.81] (HELO mxout2.iskon.hr) (213.191.128.81) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 16 Feb 2009 12:22:40 +0000 Received: (qmail 9268 invoked from network); 16 Feb 2009 13:22:20 +0100 X-Remote-IP: 213.191.142.122 Received: from unknown (HELO mx.iskon.hr) (213.191.142.122) by mxout2.iskon.hr with SMTP; 16 Feb 2009 13:22:20 +0100 Received: (qmail 20805 invoked from network); 16 Feb 2009 13:22:20 +0100 X-AVScan: ClamAV X-Remote-IP: 89.164.45.237 Received: from 45-237.dsl.iskon.hr (HELO mturk.csb) (89.164.45.237) by mx.iskon.hr with SMTP; 16 Feb 2009 13:22:20 +0100 Message-ID: <49995A76.8070909@apache.org> Date: Mon, 16 Feb 2009 13:22:14 +0100 From: Mladen Turk User-Agent: Thunderbird 2.0.0.17 (X11/20080915) MIME-Version: 1.0 To: Arsen Chaloyan CC: dev@apr.apache.org Subject: Re: Interruptable pollset References: <729474.78159.qm@web111308.mail.gq1.yahoo.com> <49914FEE.200@apache.org> <598547.68635.qm@web111303.mail.gq1.yahoo.com> <4994581E.4000009@apache.org> <659330.37636.qm@web111312.mail.gq1.yahoo.com> In-Reply-To: <659330.37636.qm@web111312.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Arsen Chaloyan wrote: > Well, below is final at this time not so trivial issue still concerning > Windows implementation only. > > Description: > Interruptable pollset creation sporadically fails. > > How to reproduce: > Call apr_pollset_create() in a loop, say 100 times, you will see that > some of the attempts fail. > > How to fix: > See static apr_status_t create_socket_pipe(SOCKET *rd, SOCKET *wr) in > file_io/win32/pipe.c > > The following assumption is not always true > /* Listening socket is nonblocking by now. > * The accept must create the socket > * immediatelly because we connected already. > */ > > I would say: The accept should create the socket, but still may fail. > Good point. > As far as listening socket is nonblocking, reasonable number of attempts > of accept() call should be considered. Alternatively listening socket > can be switched to blocking mode before accept() call. > Think I'll try the way how it should be done (standard wait on WSAEWOULDBLOCK) Regards -- ^(TM)