<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 11:17 AM, Ilia K <span dir="ltr"><<a href="mailto:ki.stfu@gmail.com" target="_blank">ki.stfu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch adds alternative way to get the user's home directory.</blockquote></div><br>Why is this useful?</div><div class="gmail_extra"><br></div><div class="gmail_extra">The documentation for getpwuid specifically suggests that applications should merely inspect the HOME environment variable.</div><div class="gmail_extra"><br></div><div class="gmail_extra">If this is truly necessary, it should use getpwuid_r to be thread-safe, and it should probably be protected by compatibility macros as I don't know which of the unix variants we support implement this functionality. But maybe it is sufficiently widely available across BSD, Linux, Solaris, Unix, and Mac OS variants....</div><div class="gmail_extra"><br></div><div class="gmail_extra">-Chandler</div></div>