terminal: Run command using a wrapper script
authorTyler Hall <tylerwhall@gmail.com>
Sun, 30 Jun 2013 20:16:19 +0000 (16:16 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Jul 2013 21:23:51 +0000 (22:23 +0100)
commitee6e144b37884ed922df35280c6b70d7e5dc6522
tree2b41ef2a41dbe07a66f4c02d6bca2b147808783b
parentf13e9ef7f66cb41ea2ded66d277f24ef89583e75
terminal: Run command using a wrapper script

Some terminals may not pass the environment into the child process. This
is true when using "tmux split-window." If tmux is already running, it
will start the command with the tmux session environment, ignoring the
environment where the command was issued.

This could possibly be worked around when launching tmux by injecting
variables into the user's session environment or adding the variables to
the "update-environment" tmux setting. However, both methods would
permanently alter the user's session, which is undesirable.

By using a wrapper script, we have full control over the final
environment. Replace the env dictionary with an empty data smart that
will contain the exported variables and a wrapper function that execs
the original command.

(From OE-Core rev: 3bb96671e987ce8110ce98b9f6d9efc093f8d20e)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/terminal.bbclass