Merge pull request #8794 from iMichka/test
test: make pgrep call portable
This commit is contained in:
commit
7f0754cf7c
@ -46,7 +46,7 @@ rescue Exception => e # rubocop:disable Lint/RescueException
|
|||||||
error_pipe.close
|
error_pipe.close
|
||||||
ensure
|
ensure
|
||||||
pid = Process.pid.to_s
|
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..."
|
$stderr.puts "Killing child processes..."
|
||||||
system "pkill", "-P", pid
|
system "pkill", "-P", pid
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user