From c2d8dd96aaa846d0999624dd8d1755f49e687577 Mon Sep 17 00:00:00 2001
From: Rohit Gupta <rohit.gupta@eurecom.fr>
Date: Thu, 14 Jan 2016 18:57:13 +0100
Subject: [PATCH] update for killing zombie processes

---
 cmake_targets/autotests/run_exec_lte-softmodem_tests.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
index 87a90b3ab8..cd0441ef7b 100755
--- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
@@ -1099,7 +1099,7 @@ except KeyError:
    sys.exit(1)
 
 print "Killing zombie ssh sessions from earlier sessions..."
-cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 \''
+cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
 os.system(cmd)
 
 
@@ -1114,6 +1114,12 @@ if user=='':
   user = getpass.getuser()
 if pw=='':
   pw = getpass.getpass()
+
+print "Killing zombie ssh sessions from earlier sessions..."
+cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
+cmd = cmd + '; ps aux |grep \"/usr/bin/ssh -q -l ' + user + '\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
+os.system(cmd)
+
 print "host = " + host 
 print "user = " + user
 xmlInputFile=os.environ.get('OPENAIR_DIR')+"/cmake_targets/autotests/test_case_list.xml"
-- 
2.26.2