From: Ian Jackson Subject: [OSSTEST PATCH 28/29] Manual allocation: Show tty in jobinfo Date: Mon, 7 Sep 2015 17:08:26 +0100 Message-ID: <1441642107-21826-29-git-send-email-ian.jackson@eu.citrix.com> References: <1441642107-21826-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZYzAG-00070b-5Y for xen-devel@lists.xenproject.org; Mon, 07 Sep 2015 16:21:04 +0000 In-Reply-To: <1441642107-21826-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell , Ian Jackson List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Jackson --- v2: New patch --- Osstest/Executive.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 1efcfd4..84600b4 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -498,7 +498,10 @@ END sub manual_allocation_base_jobinfo () { my $whoami = `whoami`; chomp $whoami; my $hostname = `uname -n`; chomp $hostname; - return "$whoami\@$hostname"; + my $info = "$whoami\@$hostname"; + my $tty = `tty 2>/dev/null`; chomp $tty; + $info .= " ($tty)" unless $?; + return $info; } sub alloc_resources_rollback_begin_work () { -- 1.7.10.4