diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb index 4b01d57792..1d45a3a8df 100644 --- a/tool/lib/leakchecker.rb +++ b/tool/lib/leakchecker.rb @@ -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|