Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

cd -s symlink hangs (sometimes?)



Hi,

zsh -f
% mkdir a
% ln -s a b
% cd -s b
cd: not a directory: b
% cd -s b
# kill -9 in another terminal
zsh: killed     zsh -f

strace output of a rerun where it happened the first time ($PWD is /tmp/x)
write(10, "\10cd"..., 3)                = 3
read(10, " "..., 1)                     = 1
write(10, " "..., 1)                    = 1
read(10, "-"..., 1)                     = 1
write(10, "-"..., 1)                    = 1
read(10, "s"..., 1)                     = 1
write(10, "s"..., 1)                    = 1
read(10, " "..., 1)                     = 1
write(10, " "..., 1)                    = 1
read(10, "b"..., 1)                     = 1
write(10, "b"..., 1)                    = 1
read(10, "\n"..., 1)                    = 1
write(10, "\r\n"..., 2)                 = 2
alarm(0)                                = 0
ioctl(10, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
ioctl(10, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
time(NULL)                              = 1237583357
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
open(".", O_RDONLY|O_NOCTTY|O_LARGEFILE) = 3
chdir("/")                              = 0
lstat64("tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=1040, ...}) = 0
chdir("tmp")                            = 0
lstat64(".", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=1040, ...}) = 0
lstat64("x", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
chdir("x")                              = 0
lstat64(".", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
lstat64("b", {st_mode=S_IFLNK|0777, st_size=1, ...}) = 0
fchdir(3)                               = 0
close(3)                                = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
lstat64("b", {st_mode=S_IFLNK|0777, st_size=1, ...}) = 0
chdir("../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../..")
= 0
...
[chdir repeated infinitely]

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author