aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sshfs.c b/sshfs.c
index b102dbd..d5f2ff7 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -1189,6 +1189,12 @@ static int start_ssh(struct conn *conn)
_exit(0);
}
chdir("/");
+ /*
+ * Avoid processes hanging trying to stat() OLDPWD if it is in
+ * the mount point. This can be removed if sshfs opens the
+ * mount point after establishing the ssh connection.
+ */
+ unsetenv("OLDPWD");
if (sshfs.password_stdin) {
int sfd;