Re: [PATCH 0/5] forking and threading
- From
- Brandon Williams <bmwill@google.com>
- Date
- Apr 11, 2017, 17:54 UTC
- Message-ID
- <20170411175428.GG36152@google.com>
- In-Reply-To
- <20170411173712.GN8741@aiede.mtv.corp.google.com>
On 04/11, Jonathan Nieder wrote:
Show 8 quoted lines
> Brandon Williams wrote: > Jonathan Tan had an idea about how to side-step the issue: what if > "grep" forks an appropriate set of child processes before creating any > threads and then communicates with those children using pipes? > Because no threads have been spawned yet in the children, the child > processes can use ordinary run_command. When run_command finishes, > the child is still available to launch another command using > run_command.
While that would be one way to solve the issue, I think that doing that would require more work refactoring and make grep's code path more complex than making the adjustments in run-command itself.
-- Brandon Williams