summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2012-07-25 12:47:28 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-25 14:47:01 +0100
commit3405a8bbe4a596679ba09f0287a5d479afc605be (patch)
tree593b3cc342455027112cc3502800046a94101b3a /meta
parent2ec6777de93abb67f361034c5db4d0954d3ee235 (diff)
downloadpoky-3405a8bbe4a596679ba09f0287a5d479afc605be.tar.gz
terminal.py: use unique ids for screen sessions
When running multiple sets of builds on the same system, it is hard to distinguish which build belongs to which screen session and you can end up resuming the wrong session. The simple solution is to just append the process id to the screen session invocation to make each unique. (From OE-Core rev: 1677b736bca5dc46db522da1874459d2de77209d) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/terminal.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 31317985f5..30e8f92004 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -94,9 +94,11 @@ class Screen(Terminal):
94 command = 'screen -D -m -t "{title}" -S devshell {command}' 94 command = 'screen -D -m -t "{title}" -S devshell {command}'
95 95
96 def __init__(self, sh_cmd, title=None, env=None): 96 def __init__(self, sh_cmd, title=None, env=None):
97 s_id = "devshell_%i" % os.getpid()
98 self.command = "screen -D -m -t \"{title}\" -S %s {command}" % s_id
97 Terminal.__init__(self, sh_cmd, title, env) 99 Terminal.__init__(self, sh_cmd, title, env)
98 logger.warn('Screen started. Please connect in another terminal with ' 100 logger.warn('Screen started. Please connect in another terminal with '
99 '"screen -r devshell"') 101 '"screen -r devshell %s"' % s_id)
100 102
101 103
102def prioritized(): 104def prioritized():