bug-make
[Top][All Lists]
Advanced

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

[bug #57914] abspath does resolve symlink


From: Martin Dorey
Subject: [bug #57914] abspath does resolve symlink
Date: Tue, 31 Mar 2020 14:48:58 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

Follow-up Comment #5, bug #57914 (project make):

I haven't seen half the mails relating to this bug, which might explain how it
lay unloved for so long.  I don't think I'm really adding anything to Boyski's
posts, which I hadn't seen (and they aren't in my "spam folder"), but here's a
demonstration that Make doesn't know what Bash thinks is the logical
directory:

{}
martind@paris:/tmp/rtc-400921-FILE-macro/logical$ strace -f make 2>&1 | grep
cwd
getcwd("/tmp/rtc-400921-FILE-macro/physical", 4096) = 36
getcwd("/tmp/rtc-400921-FILE-macro/physical", 4096) = 36
martind@paris:/tmp/rtc-400921-FILE-macro/logical$ strace /bin/pwd 2>&1 | grep
cwd
getcwd("/tmp/rtc-400921-FILE-macro/physical", 4096) = 36
martind@paris:/tmp/rtc-400921-FILE-macro/logical$ 
{}

Well, it could look at:

{}
martind@paris:/tmp/rtc-400921-FILE-macro/logical$ env | grep logical
PWD=/tmp/rtc-400921-FILE-macro/logical
martind@paris:/tmp/rtc-400921-FILE-macro/logical$ 
{}

... if it were willing to sacrifice potential portability or complexity.

Is bash doing the best thing it can?  Yes:

{}
martind@paris:/tmp/rtc-400921-FILE-macro$ strace -f bash -c 'cd logical' 2>&1
| grep chdir
chdir("/tmp/rtc-400921-FILE-macro/logical") = 0
martind@paris:/tmp/rtc-400921-FILE-macro$ 
{}

I didn't see the behavior mentioned in the Linux man page for chdir, though
there are mentions of ELOOP there, with extra detail at
https://pubs.opengroup.org/onlinepubs/009695399/functions/chdir.html, which
convinced me that it was chdir rather than getcwd that's following the link.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57914>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]