def create_process(cmd, run_as_root=False, addl_env=None):
 cmd = list(map(str, (addl_env_args(addl_env) + cmd)))
 if run_as_root:
  cmd = (shlex.split(config.get_root_helper(cfg.CONF)) + cmd)
 LOG.debug('Running command: %s', cmd)
 obj = utils.subprocess_popen(cmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 return (obj, cmd)

def create_process ( cmd , run_as_root = False , addl_env = None ) : cmd = list ( map ( str , ( addl_env_args ( addl_env ) + cmd ) ) ) if run_as_root : cmd = ( shlex . split ( config . get_root_helper ( cfg . CONF ) ) + cmd ) LOG . debug ( 'Running command: %s' , cmd ) obj = utils . subprocess_popen ( cmd , shell = False , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) return ( obj , cmd )
creates the insertion process for the given sensor using progname .