Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 10346 invoked from network); 1 Sep 2006 04:04:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 04:04:36 -0000 Received: (qmail 62679 invoked by uid 500); 1 Sep 2006 04:04:36 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 62327 invoked by uid 500); 1 Sep 2006 04:04:35 -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 62316 invoked by uid 99); 1 Sep 2006 04:04:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 21:04:35 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of justin.erenkrantz@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 21:04:34 -0700 Received: by ug-out-1314.google.com with SMTP id m2so847762uge for ; Thu, 31 Aug 2006 21:04:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=VVlZ3bzb06u/UaXl0vGeMc5mtScJWvP6ZNZJf9+kDwta8ihReekf6QcfFAXr8FRD4ElYm01Kbzw8UFzwShqEnpyJWvlcB6ttnJlnVKm+8DA493+xIpJlSYbfrP0D8Bb9wL4WRPvOpOk5XMml9fSnzdx+bI+jNcLKToUabTfD1Ls= Received: by 10.67.117.18 with SMTP id u18mr931980ugm; Thu, 31 Aug 2006 21:04:13 -0700 (PDT) Received: by 10.66.248.3 with HTTP; Thu, 31 Aug 2006 21:04:13 -0700 (PDT) Message-ID: <5c902b9e0608312104k27f34b0fma195ebc9f6ebd2f1@mail.gmail.com> Date: Thu, 31 Aug 2006 21:04:13 -0700 From: "Justin Erenkrantz" Sender: justin.erenkrantz@gmail.com To: "Henry Jen" Subject: Re: apr_pollset_poll does not return when socket closed Cc: "APR Development List" In-Reply-To: <44F7AF4D.8030301@ztune.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44F7AF4D.8030301@ztune.net> X-Google-Sender-Auth: 4a25687e72ff4d35 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 8/31/06, Henry Jen wrote: > Haven't get a chance to test on other platform, but wondering if this is > reasonable to expect. If it is, what do I miss in the testing code? You should read: http://mail-archives.apache.org/mod_mbox/apr-dev/200608.mbox/%3c44D113D0.9080001@apache.org%3e In short, there's no way to portably detect the socket is closed via a poll()-like mechanism. It seems like everyone keeps running into this. Apparently, the only way to know if it is closed is to read() from it - which really sucks. -- justin