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)

>> 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 so.  It would be a regression in that it would break
things in no-path-up-to-/ situations; it also would either fail or
expose paths that shouldn't be accessible in path-to-/-isn't-readable

> Why not get the kernel to keep a reference to the vnode of the
> directory that contained the process image?

> Then use some flag to open() (or similar) to open a file relative to
> that vnode?

Hacking on namei() just to get an absolute path in $(.MAKE)?  That
seems like a way-overcomplicated fix to a non-problem.  I don't see
what's wrong with just documenting that $(.MAKE) may not be an absolute
path under circumstances that cause getcwd() to fail and letting it go
at that.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index