From 4ab7eb93d7013a79f331893f67a7fb18b7d2a9a7 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 5 May 2019 13:58:44 -0700 Subject: [PATCH] test: Avoid pgrep -q, not available with GNU pgrep --- Library/Homebrew/test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/test.rb b/Library/Homebrew/test.rb index 11ed7f37b3..838556e17f 100644 --- a/Library/Homebrew/test.rb +++ b/Library/Homebrew/test.rb @@ -33,7 +33,7 @@ rescue Exception => e # rubocop:disable Lint/RescueException error_pipe.puts e.to_json error_pipe.close pid = Process.pid.to_s - if which("pgrep") && which("pkill") && system("pgrep", "-qP", pid) + if which("pgrep") && which("pkill") && system("pgrep", "-P", pid, out: :close) $stderr.puts "Killing child processes..." system "pkill", "-P", pid sleep 1