From 3405a8bbe4a596679ba09f0287a5d479afc605be Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Wed, 25 Jul 2012 12:47:28 -0500 Subject: 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 Signed-off-by: Mark Hatle Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/lib/oe/terminal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta/lib') 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): command = 'screen -D -m -t "{title}" -S devshell {command}' def __init__(self, sh_cmd, title=None, env=None): + s_id = "devshell_%i" % os.getpid() + self.command = "screen -D -m -t \"{title}\" -S %s {command}" % s_id Terminal.__init__(self, sh_cmd, title, env) logger.warn('Screen started. Please connect in another terminal with ' - '"screen -r devshell"') + '"screen -r devshell %s"' % s_id) def prioritized(): -- cgit v1.2.3-54-g00ecf