"ls" command stuck trying to list a stale mount point. How do you kill/stop it?
No, since ls
(or any other file-operating process) is in the process state "uninterruptible sleep", there is nothing that can interrupt it, even SIGKILL
can't.
Maybe you can lower the timeout values when mounting remote filesystems. sshfs
has ServerAliveInterval
and ServerAliveCountMax
.