aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-02-14 23:11:33 +0000
committerTiago Cunha <tcunha@gmx.com>2011-02-14 23:11:33 +0000
commitd0d1c0e486dc13b6e5db93819ca1b634d384f283 (patch)
tree84a3d6a559cb2cc6e90fb60fde99a3d65891e285 /cmd.c
parentd37650dc4f10c38579a8d140cac99d4c4411e729 (diff)
downloadrtmux-d0d1c0e486dc13b6e5db93819ca1b634d384f283.tar.gz
rtmux-d0d1c0e486dc13b6e5db93819ca1b634d384f283.tar.bz2
rtmux-d0d1c0e486dc13b6e5db93819ca1b634d384f283.zip
Sync OpenBSD patchset 848:
Set $TMUX without the session when background jobs are run.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index 4577fb1b..ef781aa0 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.148 2011-01-07 14:45:34 tcunha Exp $ */
+/* $Id: cmd.c,v 1.149 2011-02-14 23:11:33 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -355,7 +355,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);