Commit a63187f2 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Don't create zombies with IO.popen

The previous recommend incantation would leave the process we read from
hanging around, even though it had finished. That gives you a
'defunct'/'zombie' process.
parent f937e059
......@@ -108,7 +108,7 @@ In other repositories, such as gitlab-shell you can also use `IO.popen`.
```ruby
# Safe IO.popen example
logs = IO.popen(%W(git log), chdir: repo_dir).read
logs = IO.popen(%W(git log), chdir: repo_dir) { |p| p.read }
```
Note that unlike `Gitlab::Popen.popen`, `IO.popen` does not capture standard error.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment