From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.mongrel.devel Subject: Re: Mongrel doesn't set close-on-exec on its listen socket Date: Wed, 20 Aug 2008 01:27:37 -0700 Message-ID: <20080820082737.GA2403@yp-box.dyndns.org> References: <20080722163104.GA82787@lizzy.catnook.local> <20080818215844.GA1441@yp-box.dyndns.org> <20080819030844.GA53303@lizzy.catnook.local> Reply-To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219220916 4419 80.91.229.12 (20 Aug 2008 08:28:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2008 08:28:36 +0000 (UTC) To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed Aug 20 10:29:28 2008 Return-path: Envelope-to: gclrmd-mongrel-development@m.gmane.org Content-Disposition: inline In-Reply-To: <20080819030844.GA53303-/yjMewivvDbpLr52UxKYZsM6rOWSkUom@public.gmane.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.mongrel.devel:65 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVj46-0004OT-RE for gclrmd-mongrel-development@m.gmane.org; Wed, 20 Aug 2008 10:29:15 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 668701588030; Wed, 20 Aug 2008 04:28:12 -0400 (EDT) Received: from hand.yhbt.net (hand.yhbt.net [66.150.188.102]) by rubyforge.org (Postfix) with ESMTP id 54DCF18581B1 for ; Wed, 20 Aug 2008 04:27:44 -0400 (EDT) Received: from localhost.localdomain (localhost [127.0.0.1]) by hand.yhbt.net (Postfix) with ESMTP id BB1982DC01B; Wed, 20 Aug 2008 01:27:37 -0700 (PDT) List-Post: Jos Backus wrote: > On Mon, Aug 18, 2008 at 02:59:21PM -0700, Eric Wong wrote: > > This probably works: > > > > diff --git a/lib/mongrel.rb b/lib/mongrel.rb > > index 8b5dfe2..027bfdb 100644 > > --- a/lib/mongrel.rb > > +++ b/lib/mongrel.rb > > @@ -91,6 +91,9 @@ module Mongrel > > > > tries = 0 > > @socket = TCPServer.new(host, port) > > + if defined?(Fcntl::FD_CLOEXEC) > > + @socket.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) > > + end > > > > @classifier = URIClassifier.new > > @host = host > > Looks reasonable to me. Thanks, Eric. Can somebody commit, please? I've just committed it, r1036 to trunk. Thanks for the report! -- Eric Wong