tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

On Apr 21,  5:40am, (David Holland) wrote:
-- Subject: $ORIGIN (was: Re: make: ensure ${.MAKE} works)

| On Thu, Apr 15, 2010 at 08:40:19AM +0000, David Holland wrote:
|  >> Wish we had working $ORIGIN...
|  > 
|  > We will fairly soon, I think... :-)
| To wit: as far as I can tell, having been wading around in that code
| recently, the only problem with what we have is that if the path sent
| back by namei isn't absolute it needs a getcwd() stuck on the front of
| it.
| Is it reasonable to just do that? I don't think calling getcwd() from
| exec is going to cause locking problems, but it might be more overhead
| than we want to swallow.

The code that we have there works fine now, yamt objected about it because
strictly speaking the path could have been evicted from the namei() cache,
but this never happens since the call is immediately after. Calling getcwd
will add overhead and it is not really necessary because we already did
resolve the path.


Home | Main Index | Thread Index | Old Index