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

Re: zsh sometimes sets $PWD to "." when executed



Is this still happening?  What does "pwd -P" return in such
circumstances?

> I'm reassigning the bug to zsh, as I now know that the problem doesn't
> come from screen. However it has always occurred in screen (but this
> isn't necessarily meaningful).
> 
> This time, the bug occurred on another account (but still in screen and
> still in an NFS directory). Instead of opening a new screen window, I did
> the following, where z is:
> 
> alias z='if [[ -o login ]]
>   then exec $SHELL -l;
>   else exec $SHELL;
>   fi'
> 
> liberte:~/oldtests[130]> z                                            <18:13:16
> zshenv...
> zshrc...
> Shell level: 2 (login shell)
> The tty is frozen
> zlogin...
> liberte:.> pwd                                                        <18:13:19
> .
> liberte:.> ll /proc/$$                                                <18:14:00
> total 0
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 cantmove
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 cmdline
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 cpu
> lrwxrwxrwx    1 vlefevre lip             0 Dec 24 18:14 cwd -> /home/vlefevre/
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 disclosure
> -r--------    1 vlefevre lip             0 Dec 24 18:14 environ
> lrwxrwxrwx    1 vlefevre lip             0 Dec 24 18:14 exe -> /home/vlefevre/bin-i386/zsh*
> dr-x------    2 vlefevre lip             0 Dec 24 18:14 fd/
> --w--w--w-    1 vlefevre lip             0 Dec 24 18:14 goto
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 lock
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 maps
> -rw-------    1 vlefevre lip             0 Dec 24 18:14 mem
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 migfilter
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 miggroup
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 mignodes
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 migpolicy
> --w-------    1 vlefevre lip             0 Dec 24 18:14 migrate
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 mounts
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 nmigs
> lrwxrwxrwx    1 vlefevre lip             0 Dec 24 18:14 root -> //
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 selected
> -rw-r--r--    1 vlefevre lip             0 Dec 24 18:14 sigmig
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 stat
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 statm
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 status
> -r--r--r--    1 vlefevre lip             0 Dec 24 18:14 where
> 
> Both $PWD and the cwd are incorrect. They should both have been
> "/home/vlefevre/oldtests".
> 
> Or is it a bug in the Linux kernel for the cwd part? FYI, for both
> machines where the bug occurred, the kernel is respectively 2.4.20
> and 2.4.22.



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