diff options
author | Ron Yorston | 2022-06-28 13:40:49 +0100 |
---|---|---|
committer | Denys Vlasenko | 2022-07-03 21:41:38 +0200 |
commit | 298ac9507bb6cb932162f863c7b9623c0a37dedb (patch) | |
tree | 636d0071ea70b55a58892ac076134ed3f4968b32 /coreutils/mknod.c | |
parent | 20a4f70ecaad79bb932af09b7317a058872cd867 (diff) | |
download | busybox-298ac9507bb6cb932162f863c7b9623c0a37dedb.zip busybox-298ac9507bb6cb932162f863c7b9623c0a37dedb.tar.gz |
lineedit: get PWD from ash
The line editing code and ash disagree when the current directory
is changed to a symbolic link:
~ $ mkdir real
~ $ ln -s real link
~ $ cd link
~/real $ pwd
/home/rmyf36/link
Note the prompt says we're in ~/real. Bash does:
[rmy@random ~]$ cd link
[rmy@random link]$ pwd
/home/rmyf36/link
Ash uses the name supplied by the user while the line editing code
calls getcwd(3). The discrepancy can be avoided by fetching the
value of PWD from ash.
Hush calls getcwd(3) when the directory is changed
so there's no disagreement with the line editing code.
There is no standard how shells should handle cd'ing into
symlinks.
function old new delta
parse_and_put_prompt 838 869 +31
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/mknod.c')
0 files changed, 0 insertions, 0 deletions