Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 1922 invoked by uid 500); 22 Apr 2002 15:34:05 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 1908 invoked from network); 22 Apr 2002 15:34:05 -0000 Sender: gregames Message-ID: <3CC42D8E.7A811481@apache.org> Date: Mon, 22 Apr 2002 11:34:38 -0400 From: Greg Ames X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19-10mdk i686) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: call to 'apr_poll' in Unix MPMs References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Michal Szymaniak wrote: > > On Wed, 17 Apr 2002, Greg Ames wrote: > > > Why do you think it's risky? Worker _might_ be able to service multiple > > sockets after a single poll, but it would break prefork for sure. > > Hmm.. imagine we have Apache with two listening sockets, one #80, very busy > with handling usual stuff, and #1080, hadling any weird protocol supported > by one of installed modules. Now imagine that a single call to poll reports > both of them ready to accept a connection. Apache takes #80 and services > it. The second socket (#1080) remains untouched (according to the 'worker' > code). Then there come more requests on #80, but #1080 still waits for > servicing. not a problem. > Will subsequent poll calls ever notice #1080 again? I mean, > before any other connection to #1080 appears? yes. > Isn't it that poll notices each event (like a need for accept) only once per socket? no. poll is read only with respect to the fd. In other words, it looks at the readiness of the file descriptor without changing its state at all. > And that _all_ reported events have to be handled before the next poll? no. Greg