Add 0004-Avoid-thousands-of-lsof-warnings-in-chroot.patch
Hideki Yamane
2 years ago
0 | From: Hideki Yamane <henrich@debian.org> | |
1 | Date: Thu, 2 Sep 2021 01:22:01 +0900 | |
2 | Subject: Avoid thousands of lsof warnings in chroot | |
3 | ||
4 | Just executing lsof in pbuilder/cowbuilder chroot environment causes | |
5 | flood of warnings. Just -l option avoids this noise. | |
6 | --- | |
7 | spec/cases/count_open_pipes.rb | 2 +- | |
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
9 | ||
10 | diff --git a/spec/cases/count_open_pipes.rb b/spec/cases/count_open_pipes.rb | |
11 | index 0245602..e54d333 100644 | |
12 | --- a/spec/cases/count_open_pipes.rb | |
13 | +++ b/spec/cases/count_open_pipes.rb | |
14 | @@ -1,5 +1,5 @@ | |
15 | require './spec/cases/helper' | |
16 | -count = ->(*) { `lsof | grep pipe | wc -l`.to_i } | |
17 | +count = ->(*) { `lsof -l | grep pipe | wc -l`.to_i } | |
18 | start = count.() | |
19 | results = Parallel.map(Array.new(20), :in_processes => 20, &count) | |
20 | puts results.max - start |