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
_______________________________________________
Mongrel-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-development

Reply via email to