Skip to content

Commit a1dba54

Browse files
authored
Merge pull request #39 from adamboutcher/patch-1
Update util.rb to fix closing of file.
2 parents ba53114 + a984736 commit a1dba54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/util.rb

+1-1
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 f != '.' && f != '..' && f.to_i >= 3
482+
if %{^\d+$}.match?(f) && f.to_i >= 3
483483
begin
484484
IO.new(f.to_i).close
485485
rescue

0 commit comments

Comments
 (0)