process_plug_in_packages to use set_term_options

Also, changed to set PATH in-house rather than via subprocess call.
This will simplify the nested process structure making management of
children easier.

Change-Id: Ib6a6467dd3bc98110da639126e4e134f61b1dafc
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/bin/process_plug_in_packages.py b/bin/process_plug_in_packages.py
index d0e22f3..a9d1bcf 100755
--- a/bin/process_plug_in_packages.py
+++ b/bin/process_plug_in_packages.py
@@ -109,6 +109,8 @@
 # Populate stock_list with options we want.
 stock_list = [("test_mode", 0), ("quiet", 1), ("debug", 0)]
 
+original_path = os.environ.get('PATH')
+
 
 def validate_parms():
     r"""
@@ -185,8 +187,10 @@
         + " --quiet=1 --show_url=1 --prefix=" \
         + auto_status_file_prefix + " --stdout=" + str(stdout) + " "
 
-    cmd_buf = "PATH=" + plug_in_dir_path.rstrip("/") + ":${PATH} ; " +\
-        auto_status_file_subcmd + cp_prefix + call_point
+    cmd_buf = "PATH=" + plug_in_dir_path.rstrip("/") + ":${PATH}"
+    print_issuing(cmd_buf)
+    os.environ['PATH'] = plug_in_dir_path.rstrip("/") + os.pathsep + original_path
+    cmd_buf = auto_status_file_subcmd + cp_prefix + call_point
     print_issuing(cmd_buf)
 
     sub_proc = subprocess.Popen(cmd_buf, shell=True)
@@ -217,6 +221,8 @@
 
     gen_setup()
 
+    set_term_options(term_requests='children')
+
     # Access program parameter globals.
     global plug_in_dir_paths
     global mch_class