From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jos Backus Newsgroups: gmane.comp.sysutils.puppet.devel,gmane.comp.lang.ruby.mongrel.devel Subject: Mongrel doesn't set close-on-exec on its listen socket Date: Tue, 22 Jul 2008 09:31:04 -0700 Message-ID: <20080722163104.GA82787@lizzy.catnook.local> Reply-To: puppet-dev@googlegroups.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1216744290 14567 80.91.229.12 (22 Jul 2008 16:31:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2008 16:31:30 +0000 (UTC) Cc: puppet-dev@googlegroups.com To: mongrel-development@rubyforge.org Original-X-From: grbounce-vwjY7QUAAADwX8_IaRnYB_4akwqsXb0B=gcspd-puppet-dev=m.gmane.org@googlegroups.com Tue Jul 22 18:32:17 2008 Return-path: Envelope-to: gcspd-puppet-dev@m.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received:date :from:to:cc:subject:message-id:reply-to:mime-version:content-type :user-agent:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere; bh=E02hfsxOrbYM2Yr7tHWpC1foGqPLObF5PWrNWzoN8bw=; b=ice0Ayh7NSarr+0FLMnWe5qQo/Ti93R1eBZiP5wrHrf+7YGzFfbn6W8E4P+0uIeXWe HdZODbuhtKLZgI6y8ETcV8dsWvW/76UuJmgf4NB9RXSEBfm+/LdvLsr3m589gDCLU/IJ +YVscOUJl/D8gekTioFjWTDmp8jjIBpYQjKu0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:date :from:to:cc:subject:message-id:reply-to:mime-version:content-type :user-agent:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere; b=y3MyeNNuGEYC9R8Zbu1MA07rAgnQ6sx+aJ7rH8uRhcHDDHXKy8R62mSBcXs8oTMv36 sHWdtZKqUTMLGrZvqeGEcfCr6LoCy0oWBOXLnqlTUJcD9au8Bn5wQ3KXda75wWcUC8lx phYbQIfcW/QO6HpNpTcykG7utEIpjZfbrKAY8= X-Sender: jos@catnook.com X-Apparently-To: puppet-dev@googlegroups.com Received-SPF: neutral (google.com: 209.204.188.132 is neither permitted nor denied by best guess record for domain of jos@catnook.com) client-ip=209.204.188.132; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.204.188.132 is neither permitted nor denied by best guess record for domain of jos@catnook.com) smtp.mail=jos@catnook.com User-Agent: Mutt/1.5.18 (2008-05-17) Original-Sender: puppet-dev@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list puppet-dev@googlegroups.com; contact puppet-dev+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere: puppet-dev@googlegroups.com Xref: news.gmane.org gmane.comp.sysutils.puppet.devel:4280 gmane.comp.lang.ruby.mongrel.devel:62 Archived-At: Received: from yx-out-2122.google.com ([74.125.44.25]) by lo.gmane.org with esmtp (Exim 4.50) id 1KLKmK-0002ue-PS for gcspd-puppet-dev@m.gmane.org; Tue, 22 Jul 2008 18:31:57 +0200 Received: by yx-out-2122.google.com with SMTP id 22so1193035yxm.63 for ; Tue, 22 Jul 2008 09:31:01 -0700 (PDT) Received: by 10.150.230.15 with SMTP id c15mr259132ybh.5.1216744254647; Tue, 22 Jul 2008 09:30:54 -0700 (PDT) Received: by 10.44.79.3 with SMTP id c3gr573hsb.0; Tue, 22 Jul 2008 09:30:47 -0700 (PDT) Received: by 10.114.125.18 with SMTP id x18mr3537376wac.14.1216744244655; Tue, 22 Jul 2008 09:30:44 -0700 (PDT) Received: from lizzy.dyndns.org (209-204-188-132.dsl.static.sonic.net [209.204.188.132]) by mx.google.com with SMTP id m39si2456942waf.2.2008.07.22.09.30.43; Tue, 22 Jul 2008 09:30:44 -0700 (PDT) Received: (qmail 82900 invoked by uid 1000); 22 Jul 2008 16:31:04 -0000 List-Post: Mongrel, at least in 1.1.4, doesn't set the close-on-exec flag on the listen socket. This leads to trouble in programs that use Mongrel and fork other programs (like puppetmasterd, part of Puppet). For an example, see http://groups.google.com/group/puppet-dev/browse_thread/thread/463f0f8cfc80cc43 Please consider applying something like the following patch: --- lib/mongrel.rb.orig 2008-07-17 17:44:42.000000000 -0400 +++ lib/mongrel.rb 2008-07-17 17:44:53.000000000 -0400 @@ -92,7 +92,9 @@ tries = 0 @socket = TCPServer.new(host, port) + @socket.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) + @classifier = URIClassifier.new @host = host @port = port If somebody can show me what the Mongrel way of making this (POSIX) platform-specific, that would be appreciated. -- Jos Backus jos at catnook.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com To unsubscribe from this group, send email to puppet-dev-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---