Set $TMUX without the session when background jobs are run.

This commit is contained in:
Nicholas Marriott
2011-01-23 11:03:43 +00:00
parent 1377427e70
commit b8023044c3
5 changed files with 35 additions and 48 deletions

2
cmd.c
View File

@ -356,7 +356,7 @@ cmd_current_session(struct cmd_ctx *ctx)
}
/* Use the session from the TMUX environment variable. */
if (data != NULL && data->pid == getpid()) {
if (data != NULL && data->pid == getpid() && data->idx != -1) {
s = session_find_by_index(data->idx);
if (s != NULL)
return (s);