Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 1996 20:24:12 -0700
From:      Poul-Henning Kamp <phk@FreeBSD.ORG>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>, nate@mt.sri.com, scott@statsci.com, current@FreeBSD.ORG
Subject:   Re: Building inside of /usr/src? 
Message-ID:  <25306.835932252@critter.tfs.com>
In-Reply-To: Your message of "Thu, 27 Jun 1996 20:27:25 PDT." <1570.835932445@time.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <1570.835932445@time.cdrom.com>, "Jordan K. Hubbard" writes:
>> If you read the comments above this section of code, and have worked on
>> asymetric AMD managed user home directory systems, and used pmake
>> in parallel mode on these systems it would be clear as to why it if
>> preferintial to use $PWD if $PWD infact resolves to the sameplace as
>> getcwd().
>
>But PWD can't be trusted, as we've already seen.  How would you
>suggest that we GUARANTEE that $PWD and getcwd() return the same
>contents?  It's useless otherwise since you'll have different
>invocations of the build return totally different obj directories and
>the only reason this didn't become a problem before was because the
>"window" for failure was narrower - you had to have a bogus $PWD at
>the time you built the links rather than just at any time.

This was discussed when this piece of code went in.  If you want to make
sure you get the "canonical" path, you need to unset PWD before calling
getcwd().  It was then (check commit-logs, probably the old cvstree)
accepted, abeit with some grumblings.  It saves a LOT of time.

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25306.835932252>