[racket-dev] Symlink trouble

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Apr 17 11:25:02 EDT 2013

At Wed, 17 Apr 2013 17:19:58 +0200, Tobias Hammer wrote:
> On Wed, 17 Apr 2013 16:39:22 +0200, Matthew Flatt <mflatt at cs.utah.edu>  
> wrote:
> > For module paths, "same file" involves only syntactic normalizations of
> > the pathname (e.g., no checking for soft links). Various pieces of the
> > system are carefully implemented to be consistent with syntactic
> > normalization. For example, suppose that PLTCOLLECTS is set to
> > "/home/mflatt/plt", but "/home/mflatt" is a symlink to "/Users/mflatt";
> > pathnames associated to modules that are accessed via collection will
> > consistently use "/home/mflatt", and not somehow hop over to
> > "/Users/mflatt". As long as a user is similarly consistent when
> > supplying paths, it all works out.
> That matches my observations. Files accessed via collection always keep  
> their
> paths 'as is'. But it is enough to start a program via racket <file>  
> instead of
> racket -l what/ever to break this.

I should have mentioned that you could use `racket <full-path-to-file>'
to avoid the problem, which is a workaround that I have used often.

> > So, Racket should take advantage of the information that nice shells
> > provide. Probably it should also act as a nice shell by default.
> What exactly do you mean by acting as a nice shell? Setting PWD for  
> subprocesses?
> In that sense it should definitely be nice (by default).


> > (As it happens, I use "csh" on Mac OS X, and it's not nice in the above
> > sense. That helps explain why I never got PWD vs. cwd() before.)
> Just tried bash, csh and ksh on linux and they all seem to set PWD. But i  
> can't tell
> if thats the default or specific to my installation.

I think it may be part of the BSD legacy for Mac OS X. On my Linux
installations, csh works as you describe.

Posted on the dev mailing list.