Skip to content

Commit d27a455

Browse files
committed
Revert "Update util.rb to fix closing of file."
This is broken and results in not closing any file descriptors.
1 parent 13dd914 commit d27a455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def safe_posix_fork(stdin = $stdin, stdout = $stdout, stderr = $stderr, &block)
479479

480480
begin
481481
Dir.foreach('/proc/self/fd') do |f|
482-
if %{^\d+$}.match?(f) && f.to_i >= 3
482+
if f != '.' && f != '..' && f.to_i >= 3
483483
begin
484484
IO.new(f.to_i).close
485485
rescue

0 commit comments

Comments
 (0)