1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-01-13 21:28:13 +02:00
ripgrep/crates
Vasili Revelas 5af7707a35 cli: fix process leak
If ripgrep was called in a way where the entire contents of a file
aren't read (like --files-with-matches, among other methods), and if the
file was read through an external process, then ripgrep would never reap
that process.

We fix this by introducing an explicit 'close' method, which we now call
when using decompression or preprocessor searches.

The implementation of 'close' is a little hokey. In particular, when we
close stdout, this usually results in a broken pipe, and, consequently,
a non-zero code returned once the child process is reaped. This is
"situation normal," so we invent a (hopefully portable) heuristic for
detecting it.

Fixes #1766, Closes #1767
2021-05-31 21:51:18 -04:00
..
cli cli: fix process leak 2021-05-31 21:51:18 -04:00
core cli: fix process leak 2021-05-31 21:51:18 -04:00
globset doc: update CI links in crate READMEs 2020-11-16 19:07:16 -05:00
grep doc: update CI links in crate READMEs 2020-11-16 19:07:16 -05:00
ignore ignore/types: add po files to supported types 2021-05-28 12:06:10 -04:00
matcher doc: update CI links in crate READMEs 2020-11-16 19:07:16 -05:00
pcre2 doc: update CI links in crate READMEs 2020-11-16 19:07:16 -05:00
printer printer: fix --vimgrep for multi-line mode 2021-05-15 08:27:59 -04:00
regex regex: add unit tests for non-matching anchor bytes 2021-05-31 21:51:18 -04:00
searcher searcher: remove variable shadowing 2021-05-31 21:51:18 -04:00