Re: [PATCH v2 1/4] real_path: resolve symlinks by hand
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Dec 9, 2016, 01:49 UTC
- Message-ID
- <CA+P7+xpjpGhk0MzyZ5VjKD_bORL9WQJvcFm8hi_ptxJpL_+NJQ@mail.gmail.com>
- In-Reply-To
- <1481241494-6861-2-git-send-email-bmwill@google.com>
On Thu, Dec 8, 2016 at 3:58 PM, Brandon Williams <bmwill@google.com> wrote:
Show 6 quoted lines
> The current implementation of real_path uses chdir() in order to resolve > symlinks. Unfortunately this isn't thread-safe as chdir() affects a > process as a whole and not just an individual thread. Instead perform > the symlink resolution by hand so that the calls to chdir() can be > removed, making real_path one step closer to being reentrant. >
Better description for this part of the change. I like the improvement, as it clearly indicates what this particular patch is about, and why, but doesn't over-state what we gain here.
The rest of this seems reasonable, though I'm not super familiar with the code, so I didn't have any comments.
Thanks, Jake