summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2012-09-24 14:05:38 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2012-09-24 14:05:38 +0100
commit5d60bc7f7c43c20fcf65531b5a5fb1fc7dcbb338 (patch)
treefd7cdea8dd53657a1545db7df6f2baa1e1c2f574 /cmd.c
parent5b85efeb93d44e504e36ae06a91c2e1b8b82c50e (diff)
Use pgrp of pty fd not pid of immediate child when recovering current working
directory (like current process). From Marcel Partap.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index d4b7e979..4a17ddc3 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1297,7 +1297,7 @@ cmd_get_default_path(struct cmd_ctx *ctx, const char *cwd)
if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
root = ctx->cmdclient->cwd;
else if (ctx->curclient != NULL && s->curw != NULL)
- root = osdep_get_cwd(s->curw->window->active->pid);
+ root = osdep_get_cwd(s->curw->window->active->fd);
else
return (s->cwd);
skip = 0;