1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Show leaked file descriptors only, without cwd, txt, and so on

This commit is contained in:
Nobuyoshi Nakada 2021-06-27 21:17:00 +09:00
parent 3839a8fe79
commit e724857f42
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -112,7 +112,7 @@ class LeakChecker
}
unless fd_leaked.empty?
unless @@try_lsof == false
@@try_lsof |= system("lsof -p #$$", out: MiniTest::Unit.output)
@@try_lsof |= system(*%W[lsof -a -d #{fd_leaked.minmax.uniq.join("-")} -p #$$], out: MiniTest::Unit.output)
end
end
h.each {|fd, list|