Thank you so much for that informative response, Ralph.

So much interesting history!

On Mon, 09 Nov 2020 15:00:55 +0000, Ralph Corderoy wrote:
> The program can't know which.  It shouldn't try and
> guess but instead just pass the argument to open(2), etc.

That was pretty much my conclusion. It was interesting to look for a 
way to do it, but I didn't really like the idea of writing a long-
winded workaround that bypassed well-trodden standard functions.

If programs can't resolve relative paths in the same way that the 
shell does, then I might have expected the shell to turn the relative 
paths into absolute ones before passing them as arguments to programs.

But that opens up a can of worms too. The shell (probably) can't know 
whether I intend a string that looks like a relative path to be 
treated as a reference to a file, or as a literal string that just 
happens to look like a path, or as a path relative to something else 
that the program is going to know about!

> If that bites the user, e.g. by trampling the wrong file, then the 
> user will have learnt symlinks are a bad idea and alternatives
> should be sought where possible.  :-)

I have symbolic links to give the effect of selectively placing some 
of the subdirectories of my home directory on an HDD. The rest of the 
home directory is on an SSD. It has worked "well enough" for quite a 
while now, but I suppose bind mounts might be a better idea.


Patrick

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-12-01 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to