Merge pull request #8794 from iMichka/test

test: make pgrep call portable
This commit is contained in:
Mike McQuaid 2020-09-23 10:27:06 +01:00 committed by GitHub
commit 7f0754cf7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ rescue Exception => e # rubocop:disable Lint/RescueException
error_pipe.close
ensure
pid = Process.pid.to_s
if which("pgrep") && which("pkill") && system("pgrep", "-P", pid, out: :close)
if which("pgrep") && which("pkill") && system("pgrep", "-P", pid, out: File::NULL)
$stderr.puts "Killing child processes..."
system "pkill", "-P", pid
sleep 1