Skip to content

Commit 6d3a863

Browse files
authored
Update util.rb to fix closing of file.
When attempting to close files, the /proc/self loop was trying to close a file being converted to an integer which was causing issues on Fedora 42, this resolved the problem.
1 parent de1f7e4 commit 6d3a863

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
@@ -481,7 +481,7 @@ def safe_posix_fork(stdin = $stdin, stdout = $stdout, stderr = $stderr, &block)
481481
Dir.foreach('/proc/self/fd') do |f|
482482
if f != '.' && f != '..' && f.to_i >= 3
483483
begin
484-
IO.new(f.to_i).close
484+
IO.new(f).close
485485
rescue
486486
nil
487487
end

0 commit comments

Comments
 (0)