Skip to content
Snippets Groups Projects
Commit 9da32e3d authored by Michka Popoff's avatar Michka Popoff
Browse files

test: make pgrep call portable

Fixes (on linux), for example for the ninja formula test:

```
pgrep
-P
83252
{out: :close}}
Invalid preceding regular expressionpgrep: write error: Bad file descriptor
Error: ninja: failed
An exception occurred within a child process:
  BuildError: Failed executing: pgrep -P 83252 {out: :close}
```

Using File:NULL is more portable.
parent 36226deb
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment