Use pgrp of pty fd not pid of immediate child when recovering current working

directory (like current process). From Marcel Partap.
This commit is contained in:
Nicholas Marriott
2012-09-24 14:05:38 +01:00
parent 5b85efeb93
commit 5d60bc7f7c
13 changed files with 41 additions and 23 deletions

2
cmd.c
View File

@ -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;