summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-30 06:34:00 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-30 06:34:00 +0000
commitaf3863ea9fd26fd8594262583bf47c211668631e (patch)
treea6a3320b7e387155a1b067fb7bc034ff2f73bdae
parent01ec5ba96f8bf53f77974785d60ef79553488f08 (diff)
downloadpuppet-af3863ea9fd26fd8594262583bf47c211668631e.tar.gz
puppet-af3863ea9fd26fd8594262583bf47c211668631e.tar.xz
puppet-af3863ea9fd26fd8594262583bf47c211668631e.zip
Fixing #440, albeit with a slightly hackish fix.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2120 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/util.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index 1242372ac..09cb7050d 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -297,6 +297,21 @@ module Util
if f
output = f.read
else
+ # FIXME There really should be a better way to do this,
+ # but it looks like webrick is already setting close_on_exec,
+ # and setting it myself doesn't seem to do anything. So,
+ # not the best, but it'll have to do.
+ if Puppet[:listen]
+ ObjectSpace.each_object do |object|
+ if object.is_a?(TCPServer) and ! object.closed?
+ begin
+ object.close
+ rescue
+ # Just ignore these, I guess
+ end
+ end
+ end
+ end
begin
$stderr.close
$stderr = $stdout.dup