This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: Added some interesting functionality to my cygwin sandbox
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 2 Jul 2003 12:48:01 -0400 (EDT)
- Subject: Re: Added some interesting functionality to my cygwin sandbox
- Reply-to: cygwin-developers at cygwin dot com
On Wed, 2 Jul 2003, Christopher Faylor wrote:
> On Wed, Jul 02, 2003 at 11:15:33AM -0400, Igor Pechtchanski wrote:
> >Why? I just tried it on Linux, and could not create a symlink to an empty
> >path. If we added some logic to link processing code in Cygwin to revert
> >to the Win32 path if the POSIX path is empty, I don't see any reason why
> >this woulnd't work... It won't even be a slowdown for normal symlinks,
> >since we'd only do this bit of logic if we failed to open the POSIX path.
>
> I really like this idea. Corinna? The symlink stuff is your code. What
> do you think?
There is, of course, a question of how to create such symlinks... There
will have to be some way to pass this information to the symlink()
function (which only takes 2 parameters), or create a new function. We'll
also need a command-line utility for this (either a new "ln" flag, or a
separate program).
> (Of course, you can *always* use the mount table for all of this. I wonder
> if we should just be using the mount table here.)
Well, we could, I guess, but then we should be consistent, e.g., since we
have /proc/registry, why not have /proc/windir? Except that I'm not sure
we can mount anything under the /proc subtree...
> >> But as we're trying to get around a problem with cymlink destinations
> >> how about having an internal name like the cygdrive prefix? That way we
> >> could guarentee that it would point to the correct location.
> >
> >Yeah, that's the previously suggested alternative. However, I'm wary of
> >any hard-coded valid paths... Corinna's idea is basically that, but with
> >the path that's normally invalid.
>
> Anything which uses a hard-coded path pollutes the name space.
Not if the path is invalid.
> I'd rather avoid that.
> cgf
FWIW, me too (at least, with valid paths). I don't think we should care
about invalid paths, as they will never clash with anything in the
namespace anyway.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton