Skip to content

Commit ea37458

Browse files
authored
Update util.rb
A per comment (OpenVoxProject/openvox#39 (comment)) in Mirrored PR to OpenVox (OpenVoxProject/openvox#39)
1 parent 0666689 commit ea37458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/puppet/util.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ 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
484-
IO.new(f).close
484+
IO.new(f.to_i).close
485485
rescue
486486
nil
487487
end

0 commit comments

Comments
 (0)