summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-09-24 13:05:10 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-09-24 13:05:10 +0000
commit42272dfbd5058724fc094eb3ea438ec6b7eb6cff (patch)
tree03d77032589c1c7fca5ddcb1d2e137f44366b988 /cmd.c
parenteb0ad181e909c83fad8c1fd2a4a37271b6980ea2 (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 021c0332..3a341b4e 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1298,7 +1298,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 = get_proc_cwd(s->curw->window->active->pid);
+ root = get_proc_cwd(s->curw->window->active->fd);
else
return (s->cwd);
skip = 0;