Change from subprocess.call to Popen
In rprocess_plug_in_packages(), change from subprocess.call() to
subprocess.Popen(). This prevents child process from becoming orphans
when the parent process is terminated.
Change-Id: I7a31694de0985799042315843662f07570d2e8a3
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_plug_in.py b/lib/gen_robot_plug_in.py
index 035f1f7..0920067 100755
--- a/lib/gen_robot_plug_in.py
+++ b/lib/gen_robot_plug_in.py
@@ -141,8 +141,9 @@
gp.print_timen("Processing " + call_point
+ " call point programs.")
- proc_plug_pkg_rc = subprocess.call(cmd_buf, shell=True,
- executable='/bin/bash')
+ sub_proc = subprocess.Popen(cmd_buf, shell=True, executable='/bin/bash')
+ sub_proc.communicate()
+ proc_plug_pkg_rc = sub_proc.returncode
if return_history:
# Get the "Running" statements from the output.